in reply to Only sometimes deprecated? "Unescaped left brace in regex is deprecated"

Quoting Karl Williamson from #128213 for perl5: No deprecation warning on literal left curly bracket in /.{/ etc:

So I tried to raise the warning only where the left brace could, with our plans, mean something other than a literal left brace. It turns out that there is lots of code like qr/{..../. That '{', since it's the first thing, can only be a left brace. And similarly in qr/^{.../ or qr/ ... ({...) .../, it can only be a left brace. So there is no need to disturb code where there is not going to be ambiguity. And this cuts down the amount of disruption significantly.

And quoting the 5.26.0 perldiag entry for "Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex":

... The contexts where no warnings or errors are raised are:

Perhaps also relevant: #131352 for perl5: Unescaped literal "{" characters appear not always to be illegal.

  • Comment on Re: Only sometimes deprecated? "Unescaped left brace in regex is deprecated"

Replies are listed 'Best First'.
Re^2: Only sometimes deprecated? "Unescaped left brace in regex is deprecated"
by LanX (Saint) on Jun 02, 2017 at 18:53 UTC
    thank you for digging that out, it's much clearer now :)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!