title: Deprecated left curly bracket in Perl regex - exactly when?
body: <p><a href="http://perldoc.perl.org/perlre.html#Quantifiers"><code>perldoc perlre</code></a> says this:</p>
  
  <blockquote>
    <p>(If a curly bracket occurs in any other context and does not form part
    of a backslashed sequence like <code>\x{...}</code>, it is treated as a regular
    character. However, a deprecation warning is raised for all such
    occurrences, and in Perl v5.26, literal uses of a curly bracket will
    be required to be escaped, say by preceding them with a backslash
    (<code>"\{"</code>) or enclosing them within square brackets (<code>"[{]"</code>). This change
    will allow for future syntax extensions (like making the lower bound
    of a quantifier optional), and better error checking of quantifiers.)</p>
  </blockquote>
  
  <p>OK, so the following prints the deprecation message.</p>
  
  <pre><code>perl -lE 'm/x{x}/'
  </code></pre>
  
  <p>Why doesn't the following?</p>
  
  <pre><code>perl -lE 'm/x({x})/'
  </code></pre>
  
  <p>e.g. in the capture group is the <code>{</code> allowed unescaped? Probably not because</p>
  
  <pre><code>perl -lE 'm/x(x{x})/'
  </code></pre>
  
  <p>also prints the warning.</p>
  
  <p>So, what is the exact "logic"?</p>
  
  <p>P.S.: I will escape every literal <code>{</code>, but am wondering about the rationale behind the above.</p>