Skip Menu |

This queue is for tickets about the Nagios-Plugin-OverHTTP CPAN distribution.

Report information
The Basics
Id: 54592
Status: resolved
Priority: 0/
Queue: Nagios-Plugin-OverHTTP

People
Owner: DOUGDUDE [...] cpan.org
Requestors: DOUGDUDE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.13_001
Fixed in: 0.13_002



Subject: Devel version broken for Perl 5.8
On Sat Feb 13 12:28:19 2010, DOUGDUDE wrote: Show quoted text
Proposed patch.
Subject: fix_regexp.patch
From 0ac909701a0f6c300cc8aa7c3b88bbb936a97b53 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson <dougwilson@live.com> Date: Sat, 13 Feb 2010 12:54:05 -0500 Subject: [PATCH] Fixed regular expressions to work with Perl 5.8 --- lib/Nagios/Plugin/OverHTTP.pm | 4 ++-- lib/Nagios/Plugin/OverHTTP/PerformanceData.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Nagios/Plugin/OverHTTP.pm b/lib/Nagios/Plugin/OverHTTP.pm index 418a10e..c9f5011 100644 --- a/lib/Nagios/Plugin/OverHTTP.pm +++ b/lib/Nagios/Plugin/OverHTTP.pm @@ -409,7 +409,7 @@ sub _parse_response_body { if (${$message_r} =~ m{\|}msx) { # Looks like there is performance data to parse somewhere - my @message_lines = split m{\v}msx, ${$message_r}; + my @message_lines = split m{[\r\n]{1,2}}msx, ${$message_r}; # Get the data from the first line my (undef, $data) = split m{\|}msx, $message_lines[0]; @@ -417,7 +417,7 @@ sub _parse_response_body { # Search through the other lines for long performance data LINE: foreach my $line (1..$#message_lines) { - if ($message_lines[$line] =~ m{\| (\V+)}msx) { + if ($message_lines[$line] =~ m{\| ([^\r\n]+)}msx) { # This line starts the long performance data my $long_data = join q{ }, $1, @message_lines[($line+1)..$#message_lines]; diff --git a/lib/Nagios/Plugin/OverHTTP/PerformanceData.pm b/lib/Nagios/Plugin/OverHTTP/PerformanceData.pm index b93dc24..e486cfa 100644 --- a/lib/Nagios/Plugin/OverHTTP/PerformanceData.pm +++ b/lib/Nagios/Plugin/OverHTTP/PerformanceData.pm @@ -30,7 +30,7 @@ use namespace::clean 0.04 -except => [qw(meta)]; ########################################################################### # PRIVATE CONSTANTS Readonly my $NUMBER => qr{[-+]? \d* (?: \. \d+)?}msx; -Readonly my $QUOTED_LABEL => qr{' .+? (?<!') (?:'{2}+)? ' (?!')}msx; +Readonly my $QUOTED_LABEL => qr{' .+? (?<!') (?:(?:'{2})+)? ' (?!')}msx; ########################################################################### # ATTRIBUTES -- 1.6.6.1
On Sat Feb 13 12:58:27 2010, DOUGDUDE wrote: Show quoted text
> On Sat Feb 13 12:28:19 2010, DOUGDUDE wrote: > > Proposed patch.
Patched in http://github.com/dougwilson/perl5-nagios-plugin-overhttp/commit/12cacf26f574596f19a01f444f37ea19fea2a27d