diff options
author | Karl Williamson <khw@cpan.org> | 2016-04-08 12:13:06 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-05-09 11:13:49 -0600 |
commit | 1656665e748b80ad0727244ca0eae788f521f64f (patch) | |
tree | 345c0e8a3a49e28cc2ca78eb3c081839983714e7 /regcomp.c | |
parent | a27615d67331a9b30d8e49e84614dffb27b77acc (diff) | |
download | perl-1656665e748b80ad0727244ca0eae788f521f64f.tar.gz |
Require literal '{' in patterns to be escaped
This has been deprecated since v5.16, with a deprecation message
displayed starting in v5.22.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -13190,14 +13190,13 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) } /* End of switch on '\' */ break; case '{': - /* Currently we don't warn when the lbrace is at the start + /* Currently we don't care if the lbrace is at the start * of a construct. This catches it in the middle of a * literal string, or when it's the first thing after * something like "\b" */ - if (! SIZE_ONLY - && (len || (p > RExC_start && isALPHA_A(*(p -1))))) - { - ckWARNregdep(p + 1, "Unescaped left brace in regex is deprecated, passed through"); + if (len || (p > RExC_start && isALPHA_A(*(p -1)))) { + RExC_parse = p + 1; + vFAIL("Unescaped left brace in regex is illegal"); } /*FALLTHROUGH*/ default: /* A literal character */ |