diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-05 17:25:57 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-10-05 17:25:57 -0700 |
commit | a21eb52b1988ec2828792ad77f68a17dda3e6feb (patch) | |
tree | 6d91d9a4f3f705440f30ae46af07fea1bf051937 /toke.c | |
parent | 82a7b38ebca5ead4666341f73512665b295afd51 (diff) | |
download | perl-a21eb52b1988ec2828792ad77f68a17dda3e6feb.tar.gz |
Correct ‘"my" variable "&f::b"...’ message
"my" variable &foo::bar can't be in a package at - line 2, near "my sub foo::bar"
It should say ‘subroutine’, not ‘variable’. When I implemented lexi-
cal subs, I thought I caught all these, must I missed this one.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -8118,7 +8118,9 @@ S_pending_ident(pTHX) /* PL_no_myglob is constant */ GCC_DIAG_IGNORE(-Wformat-nonliteral); yyerror_pv(Perl_form(aTHX_ PL_no_myglob, - PL_in_my == KEY_my ? "my" : "state", PL_tokenbuf), + PL_in_my == KEY_my ? "my" : "state", + *PL_tokenbuf == '&' ? "subroutin" : "variabl", + PL_tokenbuf), UTF ? SVf_UTF8 : 0); GCC_DIAG_RESTORE; } |