This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Raise deprecation for qr/(?foo})/
authorKarl Williamson <khw@cpan.org>
Thu, 4 Jan 2018 19:53:29 +0000 (12:53 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 19 Jan 2018 19:52:15 +0000 (12:52 -0700)
commit0367231ce260cd08bcb13082d510e5778668bcc1
tree9fd63a9cea8f5639061b376d640bdff2635c7546
parent3f04a46618bddd5191b797b7dac053fa581a91eb
Raise deprecation for qr/(?foo})/

An unescaped left brace that is meant to be taken literally is
officially deprecated, though there are no plans to remove it in contexts
where we don't expect to use it to mean something else, and no warning
is raised in those contexts.

reg_mesg.t tests the known set of these contexts, currently (after this
commit):

 /^{/
 /foo|{/
 /foo|^{/
 /foo(:?{bar)/
 /\s*{/
 /a{3,4}{/

 This commit deprecates this context:

 /foo({bar})/

 This probably should have been illegal all along when 'bar' is a valid
 quantifier, as we do with the other quantifiers that follow a left
 paren whose illegality we haven't already taken advantage of to mean
 something else:

    qr/(+0)/
    Quantifier follows nothing in regex

This deprecation will allow ({...}) to be usable for a possible future
regex extension
pod/perldelta.pod
pod/perldeprecation.pod
pod/perldiag.pod
regcomp.c
t/re/reg_mesg.t