From BPeirce at isabel.eu Wed Jul 25 18:47:47 2018 From: BPeirce at isabel.eu (Brandon Peirce) Date: Wed, 25 Jul 2018 16:47:47 +0000 Subject: [Nagios::]Monitoring::Plugin::Getopt bug + fix Message-ID: 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. BPeirce at isabel.eu 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 www.isabelgroup.eu [cid:image2baa0c.PNG at 267a5f7b.4e9a7c61] [cid:imagea47fb0.PNG at 3db357b8.48b8d382] 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image2baa0c.PNG Type: image/png Size: 4000 bytes Desc: image2baa0c.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagea47fb0.PNG Type: image/png Size: 4424 bytes Desc: imagea47fb0.PNG URL: From Sven.Nierlein at Consol.de Wed Jul 25 22:09:29 2018 From: Sven.Nierlein at Consol.de (Sven Nierlein) Date: Wed, 25 Jul 2018 22:09:29 +0200 Subject: [Nagios::]Monitoring::Plugin::Getopt bug + fix In-Reply-To: References: Message-ID: On 25.07.18 18:47, Brandon Peirce wrote: > 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... Hi, this has been fixed in https://github.com/monitoring-plugins/monitoring-plugin-perl/commit/4aa2aee51b54cb8988d87a01d1a3b9a0d90bb8bf already. However, i noticed that there hasn't been a release since and i will take care of this. Excect a release soon which will fix this. Cheers, ? Sven