diff options
author | James E Keenan <jkeenan@cpan.org> | 2018-10-12 11:55:40 -0400 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2018-10-17 07:44:45 -0400 |
commit | dcb414ac3e404a94d6b3ba0a9a06e72ae0ab368d (patch) | |
tree | 01241fedf34b26d605a6b931017865bb72ae25e4 /gv.c | |
parent | 69aa5ebd1f8de0b4ea51faeba005dbcb734e0bef (diff) | |
download | perl-dcb414ac3e404a94d6b3ba0a9a06e72ae0ab368d.tar.gz |
Fatalize use of $* and $#
Adapt tests in various files to removal of these variables. Add
t/lib/croak/gv to test fatalizations of $# and $* -- tests therein
adapted from tests formerly in t/lib/warnings/gv.
Per: RT # 133583
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -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); @@ -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) { |