X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=toke.c;h=5571500b59868b22f0e171477785c27eb81e4c28;hb=8a6aa900aaa729fd6735df2eb96e87e52d2662e8;hp=7bc766179dabca11fedf00a9e57c28b9fada404a;hpb=4ac733c9bd1b714b72e7aa46038b74060cad7c98;p=p5sagit%2Fp5-mst-13.2.git diff --git a/toke.c b/toke.c index 7bc7661..5571500 100644 --- a/toke.c +++ b/toke.c @@ -27,6 +27,7 @@ static char ident_too_long[] = "Identifier too long"; static char c_without_g[] = "Use of /c modifier is meaningless without /g"; +static char c_in_subst[] = "Use of /c modifier is meaningless in s///"; static void restore_rsfp(pTHX_ void *f); #ifndef PERL_NO_UTF16_FILTER @@ -6340,11 +6341,10 @@ S_scan_subst(pTHX_ char *start) break; } - /* issue a warning if /c is specified,but /g is not */ - if (ckWARN(WARN_REGEXP) && - (pm->op_pmflags & PMf_CONTINUE) && !(pm->op_pmflags & PMf_GLOBAL)) + /* /c is not meaningful with s/// */ + if (ckWARN(WARN_REGEXP) && (pm->op_pmflags & PMf_CONTINUE)) { - Perl_warner(aTHX_ packWARN(WARN_REGEXP), c_without_g); + Perl_warner(aTHX_ packWARN(WARN_REGEXP), c_in_subst); } if (es) {