X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/b09f87dd777efa69f72c37f5f314fee6cfde3637..46391258eca955edb5120d04f4c8fc6a1b087124:/op.c?ds=sidebyside diff --git a/op.c b/op.c index 1d676c4..2b83188 100644 --- a/op.c +++ b/op.c @@ -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 experimental */ + Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__LEXICAL_TOPIC), + "Use of %s $_ is experimental", + PL_parser->in_my == KEY_state + ? "state" + : "my"); /* allocate a spare slot and store the name in that slot */ @@ -8262,6 +8269,8 @@ Perl_ck_spair(pTHX_ OP *o) #endif kUNOP->op_first = newop; } + /* transforms OP_REFGEN into OP_SREFGEN, OP_CHOP into OP_SCHOP, + * and OP_CHOMP into OP_SCHOMP */ o->op_ppaddr = PL_ppaddr[++o->op_type]; return ck_fun(o); }