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

Sven Nierlein git at monitoring-plugins.org
Sat Apr 2 20:00:06 CEST 2016


 Module: monitoring-plugin-perl
 Branch: master
 Commit: 02f2f8a42fb976ea04ae8be54b5b027e757cefc3
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Sat Apr  2 19:53:58 2016 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=02f2f8a

make regular expression 5.8 compatible

\R was introduced in 5.10 too

---

 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 d8ebdad..93fec5d 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 =~ /^\s*\R/mxs;
+        $output .= " - " unless $message =~ /^\s*\n/mxs;
         $output .= $message;
     }
     my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef);



More information about the Commits mailing list