[monitoring-plugin-perl] make regular expression 5.8 compatible

Sven Nierlein git at monitoring-plugins.org
Sat Apr 2 19:50:05 CEST 2016


 Module: monitoring-plugin-perl
 Branch: master
 Commit: 4e3103cb1c39e691bdd7dc16372eaa26ffe7d75e
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Sat Apr  2 19:49:11 2016 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=4e3103c

make regular expression 5.8 compatible

---

 lib/Monitoring/Plugin/Functions.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm
index 5946c7d..d8ebdad 100644
--- a/lib/Monitoring/Plugin/Functions.pm
+++ b/lib/Monitoring/Plugin/Functions.pm
@@ -119,7 +119,7 @@ sub plugin_exit {
     # Setup output
     my $output = "$STATUS_TEXT{$code}";
     if (defined $message && $message ne '') {
-        $output .= " - " unless $message =~ /^\h*\R/;
+        $output .= " - " unless $message =~ /^\s*\R/mxs;
         $output .= $message;
     }
     my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef);



More information about the Commits mailing list