summaryrefslogtreecommitdiffstats
path: root/lib/Nagios
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-09-25 18:40:20 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2006-09-25 18:40:20 +0000
commitd8f912e8f5abb1476366cfea6e0fb368a9669ec4 (patch)
treedfe890aa42474694cbc2d20532c33b62595294c4 /lib/Nagios
parente0486d70c246c59d28a8ffdc042e9b8010978d2d (diff)
downloadmonitoring-plugin-perl-d8f912e8f5abb1476366cfea6e0fb368a9669ec4.tar.gz
Fix Nagios::Plugin->new( shortname => "ANYTHING" ); (Wolfgang Barth)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1481 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/Nagios')
-rw-r--r--lib/Nagios/Plugin.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm
index 88c15c5..41bff91 100644
--- a/lib/Nagios/Plugin.pm
+++ b/lib/Nagios/Plugin.pm
@@ -6,6 +6,7 @@ use 5.008004;
6use Class::Struct; 6use Class::Struct;
7struct "Nagios::__::Plugin" => { 7struct "Nagios::__::Plugin" => {
8 perfdata => '@', 8 perfdata => '@',
9 shortname => '$',
9 }; 10 };
10 11
11package Nagios::Plugin; 12package Nagios::Plugin;
@@ -38,9 +39,6 @@ sub all_perfoutput {
38 39
39sub set_thresholds { shift; Nagios::Plugin::Threshold->set_thresholds(@_); } 40sub set_thresholds { shift; Nagios::Plugin::Threshold->set_thresholds(@_); }
40 41
41my $shortname;
42sub shortname { shift; @_ ? $shortname = shift : $shortname }
43
44sub die { 42sub die {
45 my $self = shift; 43 my $self = shift;
46 Nagios::Plugin::Base::die(@_, { plugin => $self }); 44 Nagios::Plugin::Base::die(@_, { plugin => $self });