Skip to content

Commit

Permalink
Adjust message, set future fatal version
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Feb 16, 2024
1 parent cfbd2c2 commit 3e75aff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -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! */
Expand Down
4 changes: 4 additions & 0 deletions t/lib/feature/implicit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
########
Expand All @@ -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
2 changes: 1 addition & 1 deletion t/lib/warnings/op
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion t/lib/warnings/pp_ctl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e75aff

Please sign in to comment.