bug-autoconf
[Top][All Lists]
Advanced

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

Bug in autogenerated 'autoscan' Perl script


From: Ken Cotterill
Subject: Bug in autogenerated 'autoscan' Perl script
Date: Mon, 12 Dec 2016 17:07:26 +1100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

   I encountered a bug in the autogenerated 'autoconf-2.69/bin/autoscan'
   script which caused 'make check' to fail on test 503.
   The statement causing the problem is:
   s/\${[^\}]*}//g;
   which was at line 361 in my version.
   The diagnostic message was:
   "Unescaped left brace in regex is deprecated, ..."
   You can search [1]perldiag for that string (without the "...") to see
   the full message and its explanation.
   That deprecation was intoduced in v5.22: "[2]perl5220delta: A literal
   "{" should now be escaped in a pattern".
   Furthermore, the right brace in the character class does not need to be
   escaped. See "[3]perlrecharclass: Special Characters Inside a Bracketed
   Character Class".
   So, that problem line would be better as:
   s/\$\{[^}]*}//g;
   I did a quick test to demonstrate those points:
   $ perl -v | head -2 | tail -1
   This is perl 5, version 24, subversion 0 (v5.24.0) built for
   darwin-thread-multi-2level
   $ perl -E 'say q/a${b}c/ =~ s/\${[^\}]*}//r'
   Unescaped left brace in regex is deprecated, passed through in regex;
   marked by <-- HERE in m/\${ <-- HERE [^\}]*}/ at -e line 1.
   ac
   $ perl -E 'say q/a${b}c/ =~ s/\$\{[^}]*}//r'
   ac
   I edited my version of the 'autoscan' script manually; reran 'make
   check'; it completed without further problems.
   Cheers,
   Ken.

References

   1. http://perldoc.perl.org/perldiag.html
   2. 
http://perldoc.perl.org/perl5220delta.html#A-literal-%22%7b%22-should-now-be-escaped-in-a-pattern
   3. 
http://perldoc.perl.org/perlrecharclass.html#Special-Characters-Inside-a-Bracketed-Character-Class


reply via email to

[Prev in Thread] Current Thread [Next in Thread]