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
########
# toke.c
$a =~ m/$foo/sand $bar;
+$a =~ s/$foo/fool/sand $bar;
$a = <<;
no warnings 'deprecated' ;
$a =~ m/$foo/sand $bar;
+$a =~ s/$foo/fool/sand $bar;
$a = <<;
EXPECT
Having no space between pattern and following word is deprecated at - line 2.
-Use of bare << to mean <<"" is deprecated at - line 3.
+Having no space between pattern and following word is deprecated at - line 3.
+Use of bare << to mean <<"" is deprecated at - line 4.
########
# toke.c
use warnings 'syntax' ;
}
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