Skip to content

Commit 178c81d

Browse files
atoomicLeont
authored andcommitted
Fix unquoted string version issues with Perl 5.6
1 parent fe3f4bd commit 178c81d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

t/04strict_lax.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ _ fail fail
9090
CASE_DATA
9191

9292
require version;
93-
version->import( qw/is_strict is_lax/ );
93+
'version'->import( qw/is_strict is_lax/ );
9494
for my $case ( split qr/\n/, $strict_lax_data ) {
9595
my ($v, $strict, $lax) = split qr/\t+/, $case;
9696
main::ok( $strict eq 'pass' ? is_strict($v) : ! is_strict($v), "is_strict($v) [$strict]" );

t/06noop.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BEGIN {
1010
use_ok('version', 0.9925);
1111
}
1212

13-
my $v1 = version->new('1.2');
13+
my $v1 = 'version'->new('1.2');
1414
eval {$v1 = $v1 + 1};
1515
like $@, qr/operation not supported with version object/, 'No math ops with version objects';
1616
eval {$v1 = $v1 - 1};

t/07locale.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ SKIP: {
4444
setlocale(LC_NUMERIC, $loc);
4545
$ver = 1.23; # has to be floating point number
4646
ok ($ver eq "1,23", "Using locale: $loc");
47-
$v = version->new($ver);
47+
$v = 'version'->new($ver);
4848
unlike($warning, qr/Version string '1,23' contains invalid data/,
4949
"Process locale-dependent floating point");
5050
ok ($v eq "1.23", "Locale doesn't apply to version objects");
5151
ok ($v == $ver, "Comparison to locale floating point");
5252

5353
TODO: { # Resolve https://rt.cpan.org/Ticket/Display.html?id=102272
5454
local $TODO = 'Fails for Perl 5.x.0 < 5.19.0' if $] < 5.019000;
55-
$ver = version->new($]);
55+
$ver = 'version'->new($]);
5656
is "$ver", "$]", 'Use PV for dualvars';
5757
}
5858
setlocale( LC_ALL, $orig_loc); # reset this before possible skip

t/coretests.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ SKIP: {
581581

582582
{ # https://rt.cpan.org/Ticket/Display.html?id=88495
583583
@ver::ISA = $CLASS;
584-
is ref(ver->new), 'ver', 'ver can inherit from version';
585-
is ref(ver->qv("1.2.3")), 'ver', 'ver can inherit from version';
584+
is ref('ver'->new), 'ver', 'ver can inherit from version';
585+
is ref('ver'->qv("1.2.3")), 'ver', 'ver can inherit from version';
586586
}
587587

588588
{ # discovered while integrating with bleadperl

0 commit comments

Comments
 (0)