Named arguments sometimes* don't work if label is supplied in
Nagios::Monitoring::Plugin-0.51 | Monitoring::Plugin-0.39.
* Sometimes it works, sometimes not. Non-deterministic, depends on internal
Perl ordering of hash members...
I have tried to make this fix fork-agnostic. It should, with the right patch
options, apply to both with some offset.
--- a/xxx/Plugin/Getopt.pm
+++ b/xxx/Plugin/Getopt.pm
@@ -399,7 +399,7 @@
my %args;
# Named args
- if ($_[0] =~ m/^(spec|help|required|default)$/ && scalar(@_) % 2 == 0) {
+ if ($_[0] =~ m/^(spec|help|required|label|default)$/ && scalar(@_) % 2 == 0)
{
%args = validate( @_, {
spec => 1,
help => 1,
Regards,
Brandon Peirce
Brandon Peirce
Monitoring & Health Engineer Sr.
[email protected]<mailto:[email protected]>
t. +32 2 4031 875
m.+32 472 54 51 64
Isabel NV/SA
Keizerinlaan 13-15 Bld de l'Impératrice
1000 Brussels
Belgium
t. +32 2 5451 711
f. +32 2 5451 719
www.isabel.eu<http://www.isabel.eu>
www.isabelgroup.eu<http://www.isabelgroup.eu>
[cid:[email protected]]<http://www.isabel.eu>
[cid:[email protected]]
Disclaimer: This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the named addressee, you should not further read,
disclose, distribute, copy or use this e-mail or its contents, immediately
notify the sender by reply to this e-mail and delete this message as well as
any attachments without retaining a copy. The entire email disclaimer of Isabel
NV/SA<http://www.isabel.eu/en/forbusiness/support6/disclaimer/email.html>