Menu

#943 Warnings in awstats with Perl 5.22.0

7.3
closed
nobody
None
1
2016-09-18
2015-06-24
No

Hi,

Since I upgraded to Perl 5.22.0, awstats has been issuing warnings:

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE Referer}i\"/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8986.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE User-Agent}i\"/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8987.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_input_size}n/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8988.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_output_size}n/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8989.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_compression_ratio}n/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8990.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(%{ <-- HERE ratio}n)/ at /usr/pkg/awstats/cgi-bin/awstats.pl line 8991.

It's working OK nonetheless.

Discussion

  • Valrith

    Valrith - 2015-09-02

    Modify these lines to add the missing escape:

        $LogFormatString =~ s/\"%{Referer}i\"/%refererquot/g;
        $LogFormatString =~ s/\"%{User-Agent}i\"/%uaquot/g;
        $LogFormatString =~ s/%{mod_gzip_input_size}n/%gzipin/g;
        $LogFormatString =~ s/%{mod_gzip_output_size}n/%gzipout/g;
        $LogFormatString =~ s/%{mod_gzip_compression_ratio}n/%gzipratio/g;
        $LogFormatString =~ s/\(%{ratio}n\)/%deflateratio/g;
    

    Like so:

        $LogFormatString =~ s/\"%\{Referer}i\"/%refererquot/g;
        $LogFormatString =~ s/\"%\{User-Agent}i\"/%uaquot/g;
        $LogFormatString =~ s/%\{mod_gzip_input_size}n/%gzipin/g;
        $LogFormatString =~ s/%\{mod_gzip_output_size}n/%gzipout/g;
        $LogFormatString =~ s/%\{mod_gzip_compression_ratio}n/%gzipratio/g;
        $LogFormatString =~ s/\(%\{ratio}n\)/%deflateratio/g;
    

    My very limited testing showed no difference in output after adding this modification.

     
    • Marc Baudoin

      Marc Baudoin - 2015-09-02

      Valrith valrith@users.sf.net écrit :

      Modify these lines to add the missing escape:

        $LogFormatString =~ s/\"%{Referer}i\"/%refererquot/g;
        $LogFormatString =~ s/\"%{User-Agent}i\"/%uaquot/g;
        $LogFormatString =~ s/%{mod_gzip_input_size}n/%gzipin/g;
        $LogFormatString =~ s/%{mod_gzip_output_size}n/%gzipout/g;
        $LogFormatString =~ s/%{mod_gzip_compression_ratio}n/%gzipratio/g;
        $LogFormatString =~ s/\(%{ratio}n\)/%deflateratio/g;
      

      Like so:

        $LogFormatString =~ s/\"%\{Referer}i\"/%refererquot/g;
        $LogFormatString =~ s/\"%\{User-Agent}i\"/%uaquot/g;
        $LogFormatString =~ s/%\{mod_gzip_input_size}n/%gzipin/g;
        $LogFormatString =~ s/%\{mod_gzip_output_size}n/%gzipout/g;
        $LogFormatString =~ s/%\{mod_gzip_compression_ratio}n/%gzipratio/g;
        $LogFormatString =~ s/\(%\{ratio}n\)/%deflateratio/g;
      

      My very limited testing showed no difference in output after adding this modification.

      Works for me, thanks.

       
  • Marius Gedminas

    Marius Gedminas - 2016-09-18

    This was fixed in commit 6ca56baf8e5819787c128e5ccd741701cb84bfdd and the fix is part of the 7.5 release, AFAICT.

     
    • Marc Baudoin

      Marc Baudoin - 2016-09-18

      Marius Gedminas mgedmin@users.sf.net écrit :

      This was fixed in commit 6ca56baf8e5819787c128e5ccd741701cb84bfdd and the fix is part of the 7.5 release, AFAICT.

      Then I believe the case can be closed.

       
  • Laurent Destailleur (Eldy)

    Yes, should be fixed with 7.5

     
  • Laurent Destailleur (Eldy)

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB