summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2018-10-12 11:55:40 -0400
committerJames E Keenan <jkeenan@cpan.org>2018-10-17 07:44:45 -0400
commitdcb414ac3e404a94d6b3ba0a9a06e72ae0ab368d (patch)
tree01241fedf34b26d605a6b931017865bb72ae25e4 /gv.c
parent69aa5ebd1f8de0b4ea51faeba005dbcb734e0bef (diff)
downloadperl-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.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/gv.c b/gv.c
index 4f3a272d1f..798c3ae92f 100644
--- a/gv.c
+++ b/gv.c
@@ -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) {