diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-12-04 09:53:55 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-04 10:51:22 -0800 |
commit | 90b58ec9e4b2574a8f7f11a0215f42453cfbc0a1 (patch) | |
tree | 060d70e0675340b11c84a2743634ec97e14bfa6b /op.c | |
parent | 668a86254af1576eb43991facafcf3693c919b3f (diff) | |
download | perl-90b58ec9e4b2574a8f7f11a0215f42453cfbc0a1.tar.gz |
Deprecate lexical $_
See tickets #114020 and #75598 for why.
The changes to tests in cpan/Text-Tabs have been submitted upstream
at rt.cpan.org #81698.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -578,6 +578,13 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags) PL_parser->in_my == KEY_state ? "state" : "my"), flags & SVf_UTF8); } } + else if (len == 2 && name[1] == '_' && !is_our) + /* diag_listed_as: Use of my $_ is deprecated */ + Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), + "Use of %s $_ is deprecated", + PL_parser->in_my == KEY_state + ? "state" + : "my"); /* allocate a spare slot and store the name in that slot */ |