summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/op.c b/op.c
index 77d183bfb4..ce3261e764 100644
--- a/op.c
+++ b/op.c
@@ -7295,9 +7295,10 @@ Perl_ck_join(pTHX_ OP *o)
if (ckWARN(WARN_SYNTAX)) {
const REGEXP *re = PM_GETRE(kPMOP);
const char *pmstr = re ? re->precomp : "STRING";
+ const STRLEN len = re ? re->prelen : 6;
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
- "/%s/ should probably be written as \"%s\"",
- pmstr, pmstr);
+ "/%.*s/ should probably be written as \"%.*s\"",
+ len, pmstr, len, pmstr);
}
}
return ck_fun(o);