summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-01-22 13:34:54 -0700
committerKarl Williamson <public@khwilliamson.com>2013-01-23 19:35:34 -0700
commitff56e4f1f932959354fde1f616e4834c066c0181 (patch)
treec7234a973cceaa8eabb7edc74507ea43f728df84 /regcomp.c
parent0d6106aa7a7bf59a333387bc6170353dcd78d3f3 (diff)
downloadperl-ff56e4f1f932959354fde1f616e4834c066c0181.tar.gz
Add deprecation warning for literal PATWS under /x
This is explained in the perldelta changes in this commit. We plan to migrate to Unicode's definition of white-space to ignore under /x. That means we should raise a deprecation warning in the meantime if anyone currently uses these characters in such a way as to have the meaning changed when the migration is completed.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index a8322ea1cf..2c7709aa88 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10791,6 +10791,15 @@ tryagain:
break;
default: /* A literal character */
+ if (! SIZE_ONLY
+ && RExC_flags & RXf_PMf_EXTENDED
+ && ckWARN(WARN_DEPRECATED)
+ && is_PATWS_non_low(p, UTF))
+ {
+ vWARN_dep(p + ((UTF) ? UTF8SKIP(p) : 1),
+ "Escape literal pattern white space under /x");
+ }
+
normal_default:
if (UTF8_IS_START(*p) && UTF) {
STRLEN numlen;