summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Nagios/Plugin')
-rw-r--r--lib/Nagios/Plugin/Functions.pm10
-rw-r--r--lib/Nagios/Plugin/Performance.pm2
-rw-r--r--lib/Nagios/Plugin/Range.pm2
-rw-r--r--lib/Nagios/Plugin/Threshold.pm2
4 files changed, 10 insertions, 6 deletions
diff --git a/lib/Nagios/Plugin/Functions.pm b/lib/Nagios/Plugin/Functions.pm
index 9cb7eb6..804661c 100644
--- a/lib/Nagios/Plugin/Functions.pm
+++ b/lib/Nagios/Plugin/Functions.pm
@@ -1,7 +1,10 @@
1# This module holds all exported variables 1# Functional interface to basic Nagios::Plugin constants, exports,
2# and base functions 2# and functions
3
3package Nagios::Plugin::Functions; 4package Nagios::Plugin::Functions;
4 5
6use 5.006;
7
5use strict; 8use strict;
6use warnings; 9use warnings;
7use File::Basename; 10use File::Basename;
@@ -47,7 +50,8 @@ sub get_shortname {
47 return $arg{plugin}->shortname if $arg{plugin}; 50 return $arg{plugin}->shortname if $arg{plugin};
48 51
49 my $shortname = uc basename($ENV{NAGIOS_PLUGIN} || $0); 52 my $shortname = uc basename($ENV{NAGIOS_PLUGIN} || $0);
50 $shortname =~ s/^CHECK_//; 53 $shortname =~ s/^CHECK_//; # Remove any leading CHECK_
54 $shortname =~ s/\..*$//; # Remove any trailing suffix
51 return $shortname; 55 return $shortname;
52} 56}
53 57
diff --git a/lib/Nagios/Plugin/Performance.pm b/lib/Nagios/Plugin/Performance.pm
index 38803a6..512e07d 100644
--- a/lib/Nagios/Plugin/Performance.pm
+++ b/lib/Nagios/Plugin/Performance.pm
@@ -1,6 +1,6 @@
1package Nagios::Plugin::Performance; 1package Nagios::Plugin::Performance;
2 2
3use 5.008004; 3use 5.006;
4 4
5use strict; 5use strict;
6use warnings; 6use warnings;
diff --git a/lib/Nagios/Plugin/Range.pm b/lib/Nagios/Plugin/Range.pm
index f354a54..53a857f 100644
--- a/lib/Nagios/Plugin/Range.pm
+++ b/lib/Nagios/Plugin/Range.pm
@@ -1,6 +1,6 @@
1package Nagios::Plugin::Range; 1package Nagios::Plugin::Range;
2 2
3use 5.008004; 3use 5.006;
4 4
5use strict; 5use strict;
6use warnings; 6use warnings;
diff --git a/lib/Nagios/Plugin/Threshold.pm b/lib/Nagios/Plugin/Threshold.pm
index 3e14d82..829da66 100644
--- a/lib/Nagios/Plugin/Threshold.pm
+++ b/lib/Nagios/Plugin/Threshold.pm
@@ -1,6 +1,6 @@
1package Nagios::Plugin::Threshold; 1package Nagios::Plugin::Threshold;
2 2
3use 5.008004; 3use 5.006;
4 4
5use strict; 5use strict;
6use warnings; 6use warnings;