c381278171e061dba8483ba5fab0b43174e42ad1
[collab-maint/awstats.git] / debian / patches / 1004_perl_version.patch
1 Description: Disable nested includes warnings for Perl < 5.6.
2 Author: Nick Leverton <nick@leverton.org>
3 Bug-Debian: http://bugs.debian.org/432096
4 Bug-Debian: http://bugs.debian.org/440035
5 Bug-Debian: http://bugs.debian.org/519319
6 Forwarded: https://sourceforge.net/p/awstats/bugs/907
7
8 ---
9  tools/awstats_buildstaticpages.pl |    2 +-
10  wwwroot/cgi-bin/awstats.pl        |    2 +-
11  2 files changed, 2 insertions(+), 2 deletions(-)
12
13 --- a/wwwroot/cgi-bin/awstats.pl
14 +++ b/wwwroot/cgi-bin/awstats.pl
15 @@ -1868,7 +1868,7 @@
16                                         $includeFile = "$1$includeFile";
17                                 }
18                         }
19 -                       if ( $level > 1 ) {
20 +                       if ( $level > 1 && $^V lt v5.6.0 ) {
21                                 warning(
22  "Warning: Perl versions before 5.6 cannot handle nested includes"
23                                 );
24 --- a/tools/awstats_buildstaticpages.pl
25 +++ b/tools/awstats_buildstaticpages.pl
26 @@ -191,7 +191,7 @@
27                             # Correct relative include files
28                                 if ($FileConfig =~ /^(.*[\\\/])[^\\\/]*$/) { $includeFile = "$1$includeFile"; }
29                         }
30 -                       if ($level > 1) {
31 +                       if ( $level > 1 && $^V lt v5.6.0 ) {
32                                 warning("Warning: Perl versions before 5.6 cannot handle nested includes");
33                                 next;
34                         }