summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-06-26 17:41:40 -0600
committerJesse Vincent <jesse@bestpractical.com>2010-06-28 22:30:05 -0400
commitaa78b6614081231ad68f121592365c3c2623bf3d (patch)
tree2709481a2aa3e7efdd4932a028960ab8c9cd07d1 /toke.c
parent0967016db4c3b7101c63952f44f5b31f6a16b6d2 (diff)
downloadperl-aa78b6614081231ad68f121592365c3c2623bf3d.tar.gz
Deprecate no space after s/a/b/ and keyword
Pattern replacements need to have the deprecation added; the prior patch on this ticket only changed m/a/keyword; this adds the s/a/b/keyword
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 8cbe28a829..7da7ab9469 100644
--- a/toke.c
+++ b/toke.c
@@ -11974,8 +11974,14 @@ S_scan_subst(pTHX_ char *start)
}
else if (strchr(S_PAT_MODS, *s))
pm->op_pmflags = S_pmflag(pm->op_pmflags, *s++);
- else
+ else {
+ if (isALNUM(*s)) {
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_SYNTAX),
+ "Having no space between pattern and following word is deprecated");
+
+ }
break;
+ }
}
#ifdef PERL_MAD