[monitoring-plugin-perl] correct getopt help

Sven Nierlein git at monitoring-plugins.org
Mon Dec 8 13:20:04 CET 2014

 Module: monitoring-plugin-perl
 Branch: master
 Commit: a9e61b4a6b89b6dcf73fe75d1662a0ad877279c1
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Mon Dec  8 13:15:26 2014 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=a9e61b4

correct getopt help

its not true that the options are available via the main
Monitoring::Plugin object. Instead you have to fetch them
from the opts object.

Signed-off-by: Sven Nierlein <sven at nierlein.de>


 lib/Monitoring/Plugin/Getopt.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm
index ebdd559..63f751c 100644
--- a/lib/Monitoring/Plugin/Getopt.pm
+++ b/lib/Monitoring/Plugin/Getopt.pm
@@ -524,8 +524,8 @@ processing for Nagios plugins
   # Access arguments using named accessors or or via the generic get()
-  print $ng->warning;
-  print $ng->get('critical');
+  print $ng->opts->warning;
+  print $ng->opts->get('critical');

More information about the Commits mailing list