diff --git a/op.c b/op.c index 1a19b2f0b38c2..33d8d8f8dbde5 100644 --- a/op.c +++ b/op.c @@ -8032,9 +8032,8 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) croak("Downgrading a use VERSION declaration to below v5.11 is not permitted"); /* OK lets at least warn */ - // TODO: do we set a sunset version? - ck_warner(packWARN(WARN_DEPRECATED), - "use VERSION while another use VERSION is in scope is now deprecated"); + deprecate_fatal_in(WARN_DEPRECATED, "5.46", + "use VERSION while another use VERSION is in scope"); } /* If a version >= 5.11.0 is requested, strictures are on by default! */ diff --git a/t/lib/feature/implicit b/t/lib/feature/implicit index b4bdaa3dd4b54..4ae1d1ded0dda 100644 --- a/t/lib/feature/implicit +++ b/t/lib/feature/implicit @@ -69,6 +69,8 @@ evalbytes "say 'yes'"; use 5.014; evalbytes; EXPECT +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at - line 6. +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at - line 8. say sub yes evalbytes sub @@ -80,6 +82,7 @@ print 'ss' =~ /$sharp_s/i ? "ok\n" : "nok\n"; use v5.14; print 'ss' =~ /$sharp_s/i ? "ok\n" : "nok\n"; EXPECT +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at - line 5. nok ok ######## @@ -91,5 +94,6 @@ print eval "use utf8; q|$long_s|" eq "\x{17f}" ? "ok\n" : "nok\n"; use v5.15; print eval "use utf8; q|$long_s|" eq $long_s ? "ok\n" : "nok\n"; EXPECT +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at - line 6. ok ok diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 0bb784905f572..d58334918a428 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -2162,4 +2162,4 @@ use warnings; use v5.12; use v5.20; EXPECT -use VERSION while another use VERSION is in scope is now deprecated at - line 3. +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at - line 3. diff --git a/t/lib/warnings/pp_ctl b/t/lib/warnings/pp_ctl index b42c9ce3d2012..21e1e4a596daa 100644 --- a/t/lib/warnings/pp_ctl +++ b/t/lib/warnings/pp_ctl @@ -251,7 +251,7 @@ EXPECT use warnings; eval 'use 5.006; use 5.10.0'; EXPECT -use VERSION while another use VERSION is in scope is now deprecated at (eval 1) line 1. +use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 1) line 1. ######## # SKIP ? !$Config{default_inc_includes_dot} # NAME check warning for do with no . in @INC