I'm glad I started it out as a module, because now and then I get the opportunity to find out it doesn't do what I (and probably you) expect it to do... I've squatted a bug in v0.03 (uploaded to CPAN during my "silence" in the blogosphere).
If you where using exception handling in perl (maybe you don't do it explicitly, but a module you use does), Nagios::Plugin::DieNicely would catch it, and exit your script instead of the exception being captured in the eval.
I've discovered a couple flaws more in the module...
perl -d my_nagiospluginis broken when Nagios::Plugin::DieNicely is used.
- Nagios::Plugin::DieNicely doesn't play well with the way the Math::Bigint module
detects the library it wants to use. Declare the math library you want to use explicitly and everything works OK.
use Math::BigInt lib => 'Calc';
I haven't had time to look into why these bugs are there. Any ideas?