(?p{}) has been deprecated for a long time.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 28 Feb 2007 08:54:05 +0000 (08:54 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 28 Feb 2007 08:54:05 +0000 (08:54 +0000)
Remove it, so people are not confused with regard to the
new /p regexp modifier.

p4raw-id: //depot/perl@30424

regcomp.c
t/lib/warnings/regcomp
toke.c

index 51ea224..2787636 100644 (file)
--- 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 != '{') {
index 6818c62..f85aa44 100644 (file)
@@ -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 (file)
--- 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);