Package: awstats Version: 6.5+dfsg-1 Severity: normal Tags: patch I attempted to create a multi-site config which makes use of two levels of Include config files:
Site config "awstats.mysite.conf" which first Includes "awstats.default.conf" (a copy of awstats.conf as issued) which itself Includes "awstats.conf.local" Awstats rejects this with the message "Perl versions before 5.6 cannot handle nested includes" even though I am running on Perl 5.8. I don't see any test for the Perl version in the section of code that produces this message (line 1203 in my awstats.pl). The code appears to be trying to handle nested includes OK but bails out in the middle due to this test, which I therefore think is erroneous. I could move the Includes around but it would suit me better to use multi level Includes as it avoids editing the standard awstats.conf on updates. I can simply copy it (after review of course) to awstats.default.conf. I've attached a patch for your review. This allows nested includes (up to awstats' predefined limit of 10 levels) and on my 2-level testing they appear to work fine under Apache 2.2, mod_perl and Perl 5.8. Nick -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (600, 'stable'), (500, 'oldstable'), (3, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-k7 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages awstats depends on: ii perl [libstorable-perl] 5.8.8-7 Larry Wall's Practical Extraction Versions of packages awstats recommends: ii libnet-xwhois-perl 0.90-3 Whois Client Interface for Perl5 -- no debconf information
--- /usr/lib/cgi-bin/awstats.pl.orig 2006-11-04 21:17:24.000000000 +0000 +++ /usr/lib/cgi-bin/awstats.pl 2007-08-29 11:41:50.000000000 +0100 @@ -1199,7 +1199,7 @@ # Correct relative include files if ($FileConfig =~ /^(.*[\\\/])[^\\\/]*$/) { $includeFile = "$1$includeFile"; } } - if ($level > 1) { + if ($level > 1 && $^V lt v5.6.0) { warning("Warning: Perl versions before 5.6 cannot handle nested includes"); next; }