Skip to content

Commit

Permalink
update fatal deprecation messages with the new version scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
book committed Dec 16, 2024
1 parent bcfbac3 commit e37eb17
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion op.c
Original file line number Diff line number Diff line change
Expand Up @@ -8287,7 +8287,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
}
else {
/* OK let's at least warn */
deprecate_fatal_in(WARN_DEPRECATED__SUBSEQUENT_USE_VERSION, "5.44",
deprecate_fatal_in(WARN_DEPRECATED__SUBSEQUENT_USE_VERSION, "44",
"Changing use VERSION while another use VERSION is in scope");
}
}
Expand Down
2 changes: 1 addition & 1 deletion pp_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3585,7 +3585,7 @@ PP(pp_goto)
: 1;
if (enterops[i])
deprecate_fatal_in(WARN_DEPRECATED__GOTO_CONSTRUCT,
"5.42",
"42",
"Use of \"goto\" to jump into a construct");
}

Expand Down
6 changes: 3 additions & 3 deletions t/lib/feature/implicit
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ evalbytes "say 'yes'";
use 5.014;
evalbytes;
EXPECT
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at - line 8.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at - line 8.
say sub
yes
evalbytes sub
Expand All @@ -81,7 +81,7 @@ print 'ss' =~ /$sharp_s/i ? "ok\n" : "nok\n";
use v5.14;
print 'ss' =~ /$sharp_s/i ? "ok\n" : "nok\n";
EXPECT
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at - line 5.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at - line 5.
nok
ok
########
Expand All @@ -93,6 +93,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
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at - line 6.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at - line 6.
ok
ok
4 changes: 2 additions & 2 deletions t/lib/warnings/op
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ use warnings;
use v5.12;
use v5.20;
EXPECT
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at - line 3.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at - line 3.
########
use warnings;
use v5.8;
Expand All @@ -2260,7 +2260,7 @@ use warnings;
use v5.10;
use v5.8;
EXPECT
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at - line 3.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at - line 3.
########
use warnings;
use v5.12;
Expand Down
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.012; use 5.14.0';
EXPECT
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.44 at (eval 1) line 1.
Changing use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 44 at (eval 1) line 1.
########
# SKIP ? !$Config{default_inc_includes_dot}
# NAME check warning for do with no . in @INC
Expand Down
2 changes: 1 addition & 1 deletion t/op/goto.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ our $TODO;
my $deprecated = 0;

local $SIG{__WARN__} = sub {
if ($_[0] =~ m/jump into a construct.*?, and will become fatal in Perl 5\.42/) {
if ($_[0] =~ m/jump into a construct.*?, and will become fatal in Perl 42/) {
$deprecated++;
}
else { warn $_[0] }
Expand Down
2 changes: 1 addition & 1 deletion t/porting/deprecation.t
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if (-e ".git") {
goto LABEL;
DONE:
like($warning,
qr/Use of "goto" to jump into a construct is deprecated, and will become fatal in Perl 5\.42/,
qr/Use of "goto" to jump into a construct is deprecated, and will become fatal in Perl 42/,
"Got expected deprecation warning");
}
# Test that we can silence deprecation warnings with "no warnings 'deprecated'"
Expand Down

0 comments on commit e37eb17

Please sign in to comment.