[Nagiosplug-checkins] Nagios-Plugin/lib/Nagios/Plugin Functions.pm, 1.2, 1.3
Gavin Carr
gonzai at users.sourceforge.net
Wed Oct 4 12:14:13 CEST 2006
Update of /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25748/lib/Nagios/Plugin
Modified Files:
Functions.pm
Log Message:
Tweak NP perldoc line widths; add missing chomp to NP::Functions.
Index: Functions.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin/Functions.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Functions.pm 26 Sep 2006 04:10:36 -0000 1.2
+++ Functions.pm 4 Oct 2006 10:14:11 -0000 1.3
@@ -75,7 +75,12 @@
# Set defaults
$code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code};
$message = '' unless defined $message;
- $message = join(' ', @$message) if ref $message eq 'ARRAY';
+ if (ref $message && ref $message eq 'ARRAY') {
+ $message = join(' ', map { chomp; $_ } @$message);
+ }
+ else {
+ chomp $message;
+ }
# Setup output
my $output = "$STATUS_TEXT{$code}";
More information about the Commits
mailing list