Menu ▾ ▴

#406 Allow nested include for perl version >= 5.6

closed
nobody
Other (206)
5
2014-08-25
2005-02-21
Zsalab
No

Hi!

Awstats (6.3) it's cool but I like to use the recursive include.
I have Debian Sarge with Perl 5.8.
Awstats warning the following line:
Warning: Perl versions before 5.6 cannot handle nested includes

I comment out the 1158-1161 lines from awstats.pl and it's
working perfectly. I know it's not a beautiful key, but it's work.

I'm not perfect in perl but a mind you can get the perl version,
and only use this warning if perl version less from 5.6.

Sorry, I not perfect in english.

Thx, Zsalab!

Discussion

  • Zsalab

    Zsalab - 2005-02-21

    Logged In: YES
    user_id=1224539

    Sorry not recursive, nedted.

     
  • nodata

    nodata - 2005-02-22

    Logged In: YES
    user_id=960750

    Check the last line of both files - are they including each
    other, or themselves?

     
  • Zsalab

    Zsalab - 2005-02-22

    Logged In: YES
    user_id=1224539

    I like use include in included config file.
    I have the followin files:
    awstats.conf
    this is include the awstats.conf.local
    awstats.conf.local
    this is no include other file
    awstats.vhost1.conf
    awstats.vhost2.conf
    ...
    this are includes the awstats.conf

    I like use the new maintrainer version of config file (awstats.conf),
    and override some property in awstats.conf.local.
    I want to use the base config (maintrainer and my) in virtualhost config files.

     
  • Zsalab

    Zsalab - 2005-02-22

    Logged In: YES
    user_id=1224539

    I replaced the expression in following lines (1158-1161) in awstats.pl
    I'm not a perl programmer, but it's working.
    I dont know it's cool or bad solution.

    if ($level > 1) {
    warning("Warning: Perl versions before 5.6 cannot handle nested includes");
    next;
    }

    to

    if (( $] < 5.006 ) && ($level > 1)) {
    warning("Warning: Perl versions before 5.6 cannot handle nested includes");
    next;
    }

     
  • Georges Kesseler

    Logged In: YES
    user_id=207643

    I have exactly the same request and corrected it the same
    way remove the 2 lines:
    warning("Warning: Perl versions before 5.6 cannot
    handle nested includes");
    next;

    This "BUG" is present since several versions, why such
    simple thing is not corrected?

    HINT: if oyu want to not touch the maintainer version, do it
    the debian way, include at the end of awstats.conf a file
    awstats.local.conf where you will put your common
    definitions (e.g. language...)

    And then for all your virtual hosts, first include in each
    conf file the awstats.conf and then set specific vars for
    that host.

    very easy config, and that's why I need the nested includes
    to work

     
  • Georges Kesseler

    Logged In: YES
    user_id=207643

    to patch (if your awstats.pl is in /usr/lib/cgi-bin/):

    perl -pi -e 's/\Qif (\E\$\Qlevel > 1) {\E/if (( \$] < 5.006
    ) && (\$level > 1)) {/' /usr/lib/cgi-bin/awstats.pl

     
  • Ryan Carsten Schmidt

    Logged In: YES
    user_id=838923

    Bug 1408271 explains why this fix is insufficient.

     
  • CronoS6

    CronoS6 - 2006-11-16

    Logged In: YES
    user_id=1023839
    Originator: NO

    Same problem here

    Running Ubuntu Edgy with Awstats 6.5-2ubuntu1 But i can't comment out the 1158-1161 because the script looks different.

    Any issue ?

     
  • jegor

    jegor - 2009-03-19

    The same issue happens using latest stable 6.9 version on Windows with ActivePerl v5.10

    Is this going to be fixed in next version?

    Thank you.

     
  • Laurent Destailleur (Eldy)

    The request was closed because date is old.
    Problem might be fixed or patch may be obsolete.

    If this is not true, please resubmit the request.

     

Log in to post a comment.