summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-11-24 14:32:50 -0500
committerDavid Golden <dagolden@cpan.org>2010-11-24 14:32:50 -0500
commit725a61d709bfdf8b3423a1409027c3ea9cd0c4f9 (patch)
treecc8cc1389f2d1d818c9cb6fc885a431e090cbc95 /toke.c
parentd59a8b3e000058b06c6c29b782826d702b04630a (diff)
downloadperl-725a61d709bfdf8b3423a1409027c3ea9cd0c4f9.tar.gz
Deprecate ?PATTERN? without explicit m operator
Deprecate ?PATTERN?, recommending the equivalent m?PATTERN? syntax, in order to eventually allow the question mark to be used in new operators that would currently be ambiguous. (With minor reconciliation edits by David Golden) Signed-off-by: David Golden <dagolden@cpan.org>
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 70b1dfdf4e..584aea0247 100644
--- a/toke.c
+++ b/toke.c
@@ -5993,6 +5993,8 @@ Perl_yylex(pTHX)
|| isALNUM_lazy_if(PL_last_uni+5,UTF)
))
check_uni();
+ if (*s == '?')
+ deprecate("?PATTERN? without explicit operator");
s = scan_pat(s,OP_MATCH);
TERM(sublex_start());
}