Skip to content

Commit

Permalink
WIP: fiddlings for 5.39 horizon instead
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Aug 1, 2023
1 parent 0d72c5d commit f083cc6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions lib/strict.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
chdir 't' if -d 't';
@INC = ( '.', '../lib' );

our $local_tests = 6 + 3*3*38 + 3*11 + 3*18;
our $local_tests = 6 + 3*3*40 + 3*11 + 3*18;
require "../t/lib/common.pl";

eval qq(use strict 'garbage');
Expand Down Expand Up @@ -63,12 +63,12 @@ foreach my $minor (0..10) {
test_strict_all "use strict; use v5.$minor", "rvs";
test_strict_all "no strict; use v5.$minor", "";
}
foreach my $minor (11..36) {
foreach my $minor (11..38) {
test_strict_all "use v5.$minor", "rvs";
test_strict_all "use strict; use v5.$minor", "rvs";
test_strict_all "no strict; use v5.$minor", "";
}
foreach my $minor (37..37) {
foreach my $minor (39..39) {
test_strict_all "use v5.$minor", "rvs";
test_strict_all "use strict; use v5.$minor", "rvs";
test_strict_all "no strict; use v5.$minor", "rvs";
Expand All @@ -78,20 +78,20 @@ foreach my $minor (37..37) {
test_strict_all "use v5.8; use v5.10", "";
test_strict_all "use v5.10; use v5.8", "";
test_strict_all "use v5.10; use v5.16", "rvs";
test_strict_all "use v5.10; use v5.37", "rvs";
test_strict_all "use v5.10; use v5.39", "rvs";
{
local $SIG{__WARN__} = sub {};
test_strict_all "use v5.16; use v5.10", "";
}
test_strict_all "use v5.16; use v5.20", "rvs";
test_strict_all "use v5.20; use v5.16", "rvs";
test_strict_all "use v5.16; use v5.37", "rvs";
test_strict_all "use v5.16; use v5.39", "rvs";
{
local $SIG{__WARN__} = sub {};
test_strict_all "use v5.37; use v5.10", "rvs";
test_strict_all "use v5.39; use v5.10", "rvs";
}
test_strict_all "use v5.37; use v5.16", "rvs";
test_strict_all "use v5.37; use v5.37", "rvs";
test_strict_all "use v5.39; use v5.16", "rvs";
test_strict_all "use v5.39; use v5.39", "rvs";
}

{
Expand All @@ -107,10 +107,10 @@ foreach my $minor (37..37) {
test_strict_all "no strict 'refs'; use v5.16", "vs";
test_strict_all "no strict 'vars'; use v5.16", "rs";
test_strict_all "no strict 'subs'; use v5.16", "rv";
test_strict_all "use strict 'refs'; use v5.37", "rvs";
test_strict_all "use strict 'vars'; use v5.37", "rvs";
test_strict_all "use strict 'subs'; use v5.37", "rvs";
test_strict_all "no strict 'refs'; use v5.37", "rvs";
test_strict_all "no strict 'vars'; use v5.37", "rvs";
test_strict_all "no strict 'subs'; use v5.37", "rvs";
test_strict_all "use strict 'refs'; use v5.39", "rvs";
test_strict_all "use strict 'vars'; use v5.39", "rvs";
test_strict_all "use strict 'subs'; use v5.39", "rvs";
test_strict_all "no strict 'refs'; use v5.39", "rvs";
test_strict_all "no strict 'vars'; use v5.39", "rvs";
test_strict_all "no strict 'subs'; use v5.39", "rvs";
}
2 changes: 1 addition & 1 deletion op.c
Original file line number Diff line number Diff line change
Expand Up @@ -7902,7 +7902,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)

U16 shortver = S_extract_shortver(aTHX_ use_version);

if (shortver >= SHORTVER(5, 37)) {
if (shortver >= SHORTVER(5, 39)) {
PL_hints |= HINT_STRICT_REFS | HINT_EXPLICIT_STRICT_REFS |
HINT_STRICT_SUBS | HINT_EXPLICIT_STRICT_SUBS |
HINT_STRICT_VARS | HINT_EXPLICIT_STRICT_VARS;
Expand Down
2 changes: 1 addition & 1 deletion pod/perldeprecation.pod
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ C<use VERSION> and C<use strict>. If you specify a version >= 5.11, strict is
enabled implicitly. If you request a version < 5.11, strict will become
disabled I<even if you had previously written> C<use strict>. This was not
the previous behaviour of C<use VERSION>, which at present
for versions < 5.37 will track
for versions < 5.39 will track
explicitly-enabled strictness flags independently.

Category: "deprecated::version_downgrade"
Expand Down

0 comments on commit f083cc6

Please sign in to comment.