diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 09:25:30 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 09:54:17 -0800 |
commit | fc7debfb01ac69b2164761b2dce72408a865197e (patch) | |
tree | f06ba7b49ab86cb117d743f5e06b934cba5de9df /pp_ctl.c | |
parent | f4912a505dea4e7cb15f15e044af09ad225528df (diff) | |
download | perl-fc7debfb01ac69b2164761b2dce72408a865197e.tar.gz |
[perl #91514] Use correct error msg for default
This commit not only mentions default (as opposed to when)
in the error message about it being outside a topicalizer, but
also normalises those error messages, making them consistent with
continue and other loop controls. It also makes the perldiag
entry for when actually match the error message.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5024,7 +5024,9 @@ PP(pp_leavewhen) cxix = dopoptogiven(cxstack_ix); if (cxix < 0) - DIE(aTHX_ "Can't use when() outside a topicalizer"); + /* diag_listed_as: Can't "when" outside a topicalizer */ + DIE(aTHX_ "Can't \"%s\" outside a topicalizer", + PL_op->op_flags & OPf_SPECIAL ? "default" : "when"); POPBLOCK(cx,newpm); assert(CxTYPE(cx) == CXt_WHEN); |