Skip Menu |

This queue is for tickets about the Apache-LogRegex CPAN distribution.

Report information
The Basics
Id: 66947
Status: resolved
Priority: 0/
Queue: Apache-LogRegex

People
Owner: SPACEBAT [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.5
Fixed in: (no value)



Subject: Tests fail since perl 5.13.6
See http://matrix.cpantesters.org/?dist=Apache-LogRegex&maxver=. Here's a sample test report: http://www.cpantesters.org/cpan/report/7c8e9d5a-3c93-11e0-925d-30423ec7ed87 It seems that the failure was caused by regexp changes in bleadperl. Regards, Slaven
v5.13.5-11-gfb85c04 is the most prominent regexp change between 5.12 and 5.14. Many distros affected by this are listed in http://rt.perl.org/rt3/Ticket/Display.html?id=78008 HTH,
From: daviddlowe.flimm [...] gmail.com
On Sat Mar 26 08:35:57 2011, SREZIC wrote: Show quoted text
> It seems that the failure was caused by regexp changes in bleadperl.
Attached is a patch that should fix the issue for perl 5.14.2.
Subject: perl-6.14-regex-stringification.patch
diff -ur ./t/simple.t ./t/simple.t --- ./t/simple.t 2008-11-20 21:26:12.000000000 +0000 +++ ./t/simple.t 2011-12-22 16:47:53.520725394 +0000 @@ -9,11 +9,16 @@ my $format = '%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"'; my @fields = qw/%h %l %u %t %r %>s %b %{Referer}i %{User-Agent}i/; -my $regex = '(?-xism:^(\\S*) (\\S*) (\\S*) (\\[[^\\]]+\\]) (?-xism:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)") (\\S*) (\\S*) (?-xism:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)") (?-xism:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)")\s*$)'; my $line1 = '212.74.15.68 - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"'; my $line2 = '212.74.15.68 - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png=\" HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"'; my $line3 = '4.224.234.46 - - [20/Jul/2004:13:18:55 -0700] "GET /core/listing/pl_boat_detail.jsp?&units=Feet&checked_boats=1176818&slim=broker&&hosturl=giffordmarine&&ywo=giffordmarine& HTTP/1.1" 200 2888 "http://search.yahoo.com/bin/search?p=\"grady%20white%20306%20bimini\"" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.3; yplus 4.0.00d)"'; +my $regex; +{ + my @inner_regexs = (qr/"([^"\\]*(?:\\.[^"\\]*)*)"/, qr/"([^"\\]*(?:\\.[^"\\]*)*)"/, qr/"([^"\\]*(?:\\.[^"\\]*)*)"/); + $regex = qr/^(\S*) (\S*) (\S*) (\[[^\]]+\]) $inner_regexs[0] (\S*) (\S*) $inner_regexs[1] $inner_regexs[2]\s*$/; +} + ################################################################################ # Create a new object ################################################################################
RT-Send-CC: daviddlowe.flimm [...] gmail.com
On Thu Dec 22 11:56:16 2011, https://launchpad.net/~flimm wrote: Show quoted text
> On Sat Mar 26 08:35:57 2011, SREZIC wrote:
> > It seems that the failure was caused by regexp changes in bleadperl.
> > Attached is a patch that should fix the issue for perl 5.14.2.
Hi David, I've applied an approximation of your patch and it seems to work; the ticket will be closed when CPAN tests confirm it. Cheers, Andrew Kirkpatrick