From 02f2f8a42fb976ea04ae8be54b5b027e757cefc3 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sat, 2 Apr 2016 19:53:58 +0200 Subject: make regular expression 5.8 compatible \R was introduced in 5.10 too 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); -- cgit v0.10-9-g596f