[Nagiosplug-devel] [PATCH] shortname enhancement

Ton Voon ton.voon at opsera.com
Wed Mar 10 10:18:15 CET 2010


On 10 Mar 2010, at 07:22, Thomas Guyot-Sionnest wrote:

> Any comment on this patch? It's ugly but I can't think of any better
> way without re-writing entirely N::P.
>
>
> This patch makes shortname use the defined plugin's name if set,
> otherwise the normal method should prevail. To do so I had to
> generate shortname during np initialization instead of at use time.

Doing it during initialization sounds reasonable.

I think there is also the case where no shortname is wanted. So N::P- 
 >new( shortname => "" ) should not set a prefix (with no space added  
at the beginning too!)

Can you add a test case for this as well?

Ton





More information about the Devel mailing list