[Nagiosplug-devel] Nagios::Plugin and Help change proposal

Gavin Carr gavin at openfusion.com.au
Mon Nov 12 23:21:37 CET 2007


Hi Chris,

On Mon, Nov 12, 2007 at 10:49:31AM +0100, Christoph Maser wrote:
> i would like to see N::P changed in a way that the help feature repeats
> the argumentname itself before the help text. Right now one has to write
> something like this:
> 
> $plugin->add_arg(
>     spec => 'hello=s',
>     help => "--hello\n   Hello string",
>     required => 1,
>   );
> 
> 
> Wich can easly lead to typos. It would be nice if one could write
> 
> $plugin->add_arg(
>     spec => 'hello=s',
>     help => "Hello string",
>     required => 1,
>   );
> 
> and the help feature would automatically add "--$spec\n   "

N::P supports this, it's probably just not documented in the top-level N::P
module (there's really too much functionality to document there properly).
See N::P::Getopt for the details.

Cheers,
Gavin





More information about the Devel mailing list