[Nagiosplug-checkins] Nagios-Plugin/lib/Nagios/Plugin Functions.pm, 1.3, 1.4 Performance.pm, 1.7, 1.8 Range.pm, 1.5, 1.6 Threshold.pm, 1.7, 1.8

Gavin Carr gonzai at users.sourceforge.net
Thu Oct 5 00:02:41 CEST 2006


Update of /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26225/lib/Nagios/Plugin

Modified Files:
	Functions.pm Performance.pm Range.pm Threshold.pm 
Log Message:
Fix NP shortname defaulting; downgrade version requirements.

Index: Performance.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin/Performance.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Performance.pm	26 Sep 2006 01:10:23 -0000	1.7
+++ Performance.pm	4 Oct 2006 22:02:39 -0000	1.8
@@ -1,6 +1,6 @@
 package Nagios::Plugin::Performance;
 
-use 5.008004;
+use 5.006;
 
 use strict;
 use warnings;

Index: Threshold.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin/Threshold.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Threshold.pm	26 Sep 2006 01:10:23 -0000	1.7
+++ Threshold.pm	4 Oct 2006 22:02:39 -0000	1.8
@@ -1,6 +1,6 @@
 package Nagios::Plugin::Threshold;
 
-use 5.008004;
+use 5.006;
 
 use strict;
 use warnings;

Index: Functions.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin/Functions.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Functions.pm	4 Oct 2006 10:14:11 -0000	1.3
+++ Functions.pm	4 Oct 2006 22:02:39 -0000	1.4
@@ -1,7 +1,10 @@
-# This module holds all exported variables
-# and base functions
+# Functional interface to basic Nagios::Plugin constants, exports, 
+# and functions
+
 package Nagios::Plugin::Functions;
 
+use 5.006;
+
 use strict;
 use warnings;
 use File::Basename;
@@ -47,7 +50,8 @@
     return $arg{plugin}->shortname if $arg{plugin};
 
     my $shortname = uc basename($ENV{NAGIOS_PLUGIN} || $0);
-    $shortname =~ s/^CHECK_//;
+    $shortname =~ s/^CHECK_//;     # Remove any leading CHECK_
+    $shortname =~ s/\..*$//;       # Remove any trailing suffix
     return $shortname;
 }
 

Index: Range.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin/Range.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Range.pm	26 Sep 2006 01:10:23 -0000	1.5
+++ Range.pm	4 Oct 2006 22:02:39 -0000	1.6
@@ -1,6 +1,6 @@
 package Nagios::Plugin::Range;
 
-use 5.008004;
+use 5.006;
 
 use strict;
 use warnings;





More information about the Commits mailing list