Skip to content

Commit

Permalink
Fatalize use of $* and $#
Browse files Browse the repository at this point in the history
Per: RT # 133583
  • Loading branch information
jkeenan committed Oct 16, 2018
1 parent 7bf15fe commit 1cdf637
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions gv.c
Expand Up @@ -2203,12 +2203,10 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
break;
case '*': /* $* */
case '#': /* $# */
if (sv_type == SVt_PV)
/* diag_listed_as: $* is no longer supported. Its use will be fatal in Perl 5.30 */
Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
"$%c is no longer supported. Its use "
"will be fatal in Perl 5.30", *name);
break;
if (sv_type == SVt_PV)
/* diag_listed_as: $* is no longer supported as of Perl 5.30 */
Perl_croak(aTHX_ "$%c is no longer supported as of Perl 5.30", *name);
break;
case '\010': /* $^H */
{
HV *const hv = GvHVn(gv);
Expand Down Expand Up @@ -2311,11 +2309,8 @@ S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type)
require_tie_mod_s(gv, *name, "Tie::Hash::NamedCapture", 0);
} else if (sv_type == SVt_PV) {
if (*name == '*' || *name == '#') {
/* diag_listed_as: $# is no longer supported. Its use will be fatal in Perl 5.30 */
Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED,
WARN_SYNTAX),
"$%c is no longer supported. Its use "
"will be fatal in Perl 5.30", *name);
/* diag_listed_as: $* is no longer supported as of Perl 5.30 */
Perl_croak(aTHX_ "$%c is no longer supported as of Perl 5.30", *name);
}
}
if (sv_type==SVt_PV || sv_type==SVt_PVGV) {
Expand Down

0 comments on commit 1cdf637

Please sign in to comment.