diff options
Diffstat (limited to 'lib/Nagios/Plugin')
-rw-r--r-- | lib/Nagios/Plugin/Functions.pm | 10 | ||||
-rw-r--r-- | lib/Nagios/Plugin/Performance.pm | 2 | ||||
-rw-r--r-- | lib/Nagios/Plugin/Range.pm | 2 | ||||
-rw-r--r-- | lib/Nagios/Plugin/Threshold.pm | 2 |
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 | |||
3 | package Nagios::Plugin::Functions; | 4 | package Nagios::Plugin::Functions; |
4 | 5 | ||
6 | use 5.006; | ||
7 | |||
5 | use strict; | 8 | use strict; |
6 | use warnings; | 9 | use warnings; |
7 | use File::Basename; | 10 | use 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 @@ | |||
1 | package Nagios::Plugin::Performance; | 1 | package Nagios::Plugin::Performance; |
2 | 2 | ||
3 | use 5.008004; | 3 | use 5.006; |
4 | 4 | ||
5 | use strict; | 5 | use strict; |
6 | use warnings; | 6 | use 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 @@ | |||
1 | package Nagios::Plugin::Range; | 1 | package Nagios::Plugin::Range; |
2 | 2 | ||
3 | use 5.008004; | 3 | use 5.006; |
4 | 4 | ||
5 | use strict; | 5 | use strict; |
6 | use warnings; | 6 | use 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 @@ | |||
1 | package Nagios::Plugin::Threshold; | 1 | package Nagios::Plugin::Threshold; |
2 | 2 | ||
3 | use 5.008004; | 3 | use 5.006; |
4 | 4 | ||
5 | use strict; | 5 | use strict; |
6 | use warnings; | 6 | use warnings; |