This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fatalize some uses of unescaped '{' in patterns
authorKarl Williamson <khw@cpan.org>
Sat, 14 Jul 2018 19:50:41 +0000 (13:50 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 15 Jul 2018 00:15:06 +0000 (18:15 -0600)
commit76416d1a79fc753e73b36ea9144ab2906ee194f8
tree4dccd79f4a6215692c75f1f1f108dc805c06ed63
parent21792e61cf1f1a3c0ed1c21e7e235ed96faab01a
Fatalize some uses of unescaped '{' in patterns

This commit follows through with our schedule of making some unescaped
literal left brace usages fatal in 5.30.  Some contexts won't be made
fatal until 5.32, and, in a partial change of plan,  others won't be
made fatal at all.

The goal since before 5.20 is to allow things like \w{foo} to be added
to the language, where the 'w' could be any suitable alphabetic.
This has already been accomplished with \b, \B (for example \b{wb}).
But various impediments have prevented generalizing this.

Another goal is to make the general quantifier, X{a,b}, syntax not so
restrictive, so that spaces can be used within the braces, and the lower
bound could be omitted.

This commit is another step towards allowing this.

Uses of some contexts have been scheduled to be made fatal in 5.30.  But
a discussion I had with Peter Rabbitson at TPC persuaded me to narrow
those contexts to the ones that we actually really need.  This commit
changes those to fatal, and the others where we had previously raised a
deprecation message are changed into a non-deprecation warning.  Keeping
this as a warning prevents a construct, where the user had intended a
quantifier but made a typo, from silently being compiled into a literal
string.
pod/perldeprecation.pod
pod/perldiag.pod
regcomp.c
t/re/reg_mesg.t