diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-24 00:33:35 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-30 11:48:38 -0800 |
commit | 2a9203e94b669f45c3d0b2161702767b6a8ac237 (patch) | |
tree | 56c228dc8f79bb3cb5d58db02ef08d8c50666431 /pad.c | |
parent | 6ccbd5ffeda04f22f5ad352866c49d46b8ae84ac (diff) | |
download | perl-2a9203e94b669f45c3d0b2161702767b6a8ac237.tar.gz |
‘Subroutine (not var) "&x" will not stay shared’
Another ‘variable’ warning about lexical subs that I missed.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1233,8 +1233,11 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, && !PadnameIsSTATE(name_p[offset]) && warn && ckWARN(WARN_CLOSURE)) { newwarn = 0; + /* diag_listed_as: Variable "%s" will not stay + shared */ Perl_warner(aTHX_ packWARN(WARN_CLOSURE), - "Variable \"%"UTF8f"\" will not stay shared", + "%se \"%"UTF8f"\" will not stay shared", + *namepv == '&' ? "Subroutin" : "Variabl", UTF8fARG(1, namelen, namepv)); } |