Skip to content

Commit 6464c04

Browse files
bookericherman
authored andcommitted
fix B::Deparse tests
1 parent 7f5450d commit 6464c04

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/B/Deparse-core.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ use warnings;
3838
use strict;
3939
use Test::More;
4040

41-
use feature (sprintf(":%vd", $^V)); # to avoid relying on the feature
42-
# logic to add CORE::
41+
# to avoid relying on the feature logic to add CORE::
42+
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));
43+
4344
use B::Deparse;
4445
my $deparse = B::Deparse->new();
4546

lib/B/Deparse.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ CORE::evalbytes '';
17441744
####
17451745
# feature features when feature has been disabled by use VERSION
17461746
# CONTEXT no warnings 'deprecated';
1747-
use feature (sprintf(":%vd", $^V));
1747+
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));
17481748
use 1;
17491749
CORE::say $_;
17501750
CORE::state $x;
@@ -1775,7 +1775,7 @@ CORE::evalbytes '';
17751775
# (the above test with CONTEXT, and the output is equivalent but different)
17761776
# CONTEXT use feature ':5.10'; no warnings 'deprecated';
17771777
# feature features when feature has been disabled by use VERSION
1778-
use feature (sprintf(":%vd", $^V));
1778+
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));
17791779
use 1;
17801780
CORE::say $_;
17811781
CORE::state $x;

0 commit comments

Comments
 (0)