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
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.