diff options
author | Gavin Carr <gonzai@users.sourceforge.net> | 2006-10-04 10:14:11 +0000 |
---|---|---|
committer | Gavin Carr <gonzai@users.sourceforge.net> | 2006-10-04 10:14:11 +0000 |
commit | 579fdad51ca7c1d306ba040954864216b0e07050 (patch) | |
tree | bb90e1235e0b27b2c767c67e5c4af1e9b6bd1839 /lib/Nagios/Plugin/Functions.pm | |
parent | f06255753edb3909f83bf279079698808192089d (diff) | |
download | monitoring-plugin-perl-579fdad51ca7c1d306ba040954864216b0e07050.tar.gz |
Tweak NP perldoc line widths; add missing chomp to NP::Functions.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1488 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/Nagios/Plugin/Functions.pm')
-rw-r--r-- | lib/Nagios/Plugin/Functions.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Nagios/Plugin/Functions.pm b/lib/Nagios/Plugin/Functions.pm index e77bc4f..9cb7eb6 100644 --- a/lib/Nagios/Plugin/Functions.pm +++ b/lib/Nagios/Plugin/Functions.pm | |||
@@ -75,7 +75,12 @@ sub nagios_exit { | |||
75 | # Set defaults | 75 | # Set defaults |
76 | $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code}; | 76 | $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code}; |
77 | $message = '' unless defined $message; | 77 | $message = '' unless defined $message; |
78 | $message = join(' ', @$message) if ref $message eq 'ARRAY'; | 78 | if (ref $message && ref $message eq 'ARRAY') { |
79 | $message = join(' ', map { chomp; $_ } @$message); | ||
80 | } | ||
81 | else { | ||
82 | chomp $message; | ||
83 | } | ||
79 | 84 | ||
80 | # Setup output | 85 | # Setup output |
81 | my $output = "$STATUS_TEXT{$code}"; | 86 | my $output = "$STATUS_TEXT{$code}"; |