pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45743: www/awstats does not work with perl >= 5.14.0



>Number:         45743
>Category:       pkg
>Synopsis:       www/awstats does not work with perl >= 5.14.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 26 17:25:00 +0000 2011
>Originator:     Nils Ratusznik
>Release:        NetBSD 5.1
>Organization:
>Environment:
>Description:
As stated in Awstats' bug tracker ( forum : 
https://sourceforge.net/projects/awstats/forums/forum/43430/topic/4573686 and 
bug tracker : 
http://sourceforge.net/tracker/index.php?func=detail&aid=3311848&group_id=13764&atid=113764
 ), Awstats does not work well with perl >= 5.14.0; unfortunately, in 
pkgsrc-2011Q3, perl is in version v5.14.2.
>How-To-Repeat:
Try to create web statistics with any version of Awstats and perl >= 5.14.0. Do 
the same with the same version of Awstats and perl < 5.14.0; notice the huge 
difference in the statistics.
>Fix:
Here is a patch for /usr/pkg/awstats/cgi-bin/awstats.pl :
--- awstats.pl.orig     2011-11-20 19:28:09.000000000 +0100
+++ awstats.pl  2011-12-26 17:09:57.000000000 +0100
@@ -1354,7 +1354,7 @@
 sub OptimizeArray {
        my $array = shift;
        my @arrayunreg = map {
-               if (/\(\?[-\w]*:(.*)\)/) { $1 }
+               if (/\(\?[-^\w]*:(.*)\)/) { $1 }
        } @$array;
        my $notcasesensitive = shift;
        my $searchlist       = 0;
@@ -7809,7 +7809,7 @@
 # Return:              standardregex
 #------------------------------------------------------------------------------
 sub UnCompileRegex {
-       shift =~ /\(\?[-\w]*:(.*)\)/;
+       shift =~ /\(\?[-^\w]*:(.*)\)/;
        return $1;
 }


Patch tested with awstats-7.0nb2 and perl-5.14.2nb1



Home | Main Index | Thread Index | Old Index