From: Rafael Garcia-Suarez Date: Wed, 28 Feb 2007 08:54:05 +0000 (+0000) Subject: (?p{}) has been deprecated for a long time. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=67edc0c91ee3ef38039f1866e961b39269714a4a;p=p5sagit%2Fp5-mst-13.2.git (?p{}) has been deprecated for a long time. Remove it, so people are not confused with regard to the new /p regexp modifier. p4raw-id: //depot/perl@30424 --- diff --git a/regcomp.c b/regcomp.c index 51ea224..2787636 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5319,10 +5319,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) } /* named and numeric backreferences */ /* NOT REACHED */ - case 'p': /* (?p...) */ - if (SIZE_ONLY && ckWARN2(WARN_DEPRECATED, WARN_REGEXP)) - vWARNdep(RExC_parse, "(?p{}) is deprecated - use (??{})"); - /* FALL THROUGH*/ case '?': /* (??...) */ is_logical = 1; if (*RExC_parse != '{') { diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp index 6818c62..f85aa44 100644 --- a/t/lib/warnings/regcomp +++ b/t/lib/warnings/regcomp @@ -2,10 +2,6 @@ Quantifier unexpected on zero-length expression [S_study_chunk] - (?p{}) is deprecated - use (??{}) [S_reg] - $a =~ /(?p{'x'})/ ; - - Useless (%s%c) - %suse /%c modifier [S_reg] Useless (%sc) - %suse /gc modifier [S_reg] @@ -171,22 +167,6 @@ EXPECT Unrecognized escape \z in character class passed through in regex; marked by <-- HERE in m/[a\z <-- HERE b]/ at - line 3. ######## -# regcomp.c [S_study_chunk] -use warnings 'deprecated' ; -$a = "xx" ; -$a =~ /(?p{'x'})/ ; -no warnings ; -use warnings 'regexp' ; -$a =~ /(?p{'x'})/ ; -use warnings; -no warnings 'deprecated' ; -no warnings 'regexp' ; -no warnings 'syntax' ; -$a =~ /(?p{'x'})/ ; -EXPECT -(?p{}) is deprecated - use (??{}) in regex; marked by <-- HERE in m/(?p <-- HERE {'x'})/ at - line 4. -(?p{}) is deprecated - use (??{}) in regex; marked by <-- HERE in m/(?p <-- HERE {'x'})/ at - line 7. -######## # regcomp.c [S_reg] use warnings 'regexp' ; $a = qr/(?c)/; diff --git a/toke.c b/toke.c index 89bb87b..24accc6 100644 --- a/toke.c +++ b/toke.c @@ -2024,7 +2024,7 @@ S_scan_const(pTHX_ char *start) *d++ = NATIVE_TO_NEED(has_utf8,*s++); } else if (s[2] == '{' /* This should match regcomp.c */ - || ((s[2] == 'p' || s[2] == '?') && s[3] == '{')) + || (s[2] == '?' && s[3] == '{')) { I32 count = 1; char *regparse = s + (s[2] == '{' ? 3 : 4);