Subject: | defined %foo and defined @foo an error |
Starting from perl 5.22 defined is no longer permitted on aggregates, ie. hashes and arrays.
This has been warning as deprecated since at least 5.12, since it's behaviour is non-obvious.
The attached patch fixes the problem in Nagios-Plugin.
Tony
Subject: | leocharre-cli2-defined.diff |
diff -ru LEOCHARRE-CLI2-1.16-hZkspw/lib/LEOCHARRE/CLI2.pm LEOCHARRE-CLI2-1.16-uSpENQ/lib/LEOCHARRE/CLI2.pm
--- LEOCHARRE-CLI2-1.16-hZkspw/lib/LEOCHARRE/CLI2.pm 2010-03-25 13:45:08.000000000 +1100
+++ LEOCHARRE-CLI2-1.16-uSpENQ/lib/LEOCHARRE/CLI2.pm 2015-03-30 16:45:32.000000000 +1100
@@ -212,7 +212,7 @@
# ARGV ----- begin
sub _argv {
- defined %ARGV or _init_argv();
+ %ARGV or _init_argv();
if (my $key = shift){
return $ARGV{$key};
}