diff options
author | Sven Nierlein <sven@nierlein.org> | 2016-04-02 17:45:03 +0200 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.org> | 2016-04-02 17:45:03 +0200 |
commit | 6cf95fedc65b3a7128ae550ba24b45c8a602766a (patch) | |
tree | 741c716b3ec1eb452fd1a6a1527abe4ff7081355 /lib | |
parent | 471fef88ab046a055df95f607704557e07d56874 (diff) | |
parent | f02cb4e0cce374d92e6c2702fe113a3b6c81e304 (diff) | |
download | monitoring-plugin-perl-6cf95fe.tar.gz |
Merge pull request #11 from pdugas/master
Fixed regex in plugin_exit() that handles hyphen for LONGOUTPUT.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Monitoring/Plugin/Functions.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm index a19db49..5946c7d 100644 --- a/lib/Monitoring/Plugin/Functions.pm +++ b/lib/Monitoring/Plugin/Functions.pm | |||
@@ -119,7 +119,7 @@ sub plugin_exit { | |||
119 | # Setup output | 119 | # Setup output |
120 | my $output = "$STATUS_TEXT{$code}"; | 120 | my $output = "$STATUS_TEXT{$code}"; |
121 | if (defined $message && $message ne '') { | 121 | if (defined $message && $message ne '') { |
122 | $output .= " - " unless $message =~ /^[ \f\r\t\w]*\n/; | 122 | $output .= " - " unless $message =~ /^\h*\R/; |
123 | $output .= $message; | 123 | $output .= $message; |
124 | } | 124 | } |
125 | my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef); | 125 | my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef); |