Skip to content

Commit a8673fd

Browse files
authored
Merge pull request #14 from haarg-contrib/fix-perl-version-comparsion
fix perl version checks to use numeric comparisons
2 parents 00fac3d + 0f458da commit a8673fd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Exporter/Tiny.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ our $VERSION = '1.006002';
99
our @EXPORT_OK = qw< mkopt mkopt_hash _croak _carp >;
1010

1111
BEGIN {
12-
*_HAS_NATIVE_LEXICAL_SUB = ( $] ge '5.037002' )
12+
*_HAS_NATIVE_LEXICAL_SUB = ( "$]" >= 5.037002 )
1313
? sub () { !!1 }
1414
: sub () { !!0 };
15-
*_HAS_MODULE_LEXICAL_SUB = ( $] ge '5.011002' and eval('require Lexical::Sub') )
15+
*_HAS_MODULE_LEXICAL_SUB = ( "$]" >= 5.011002 and eval('require Lexical::Sub') )
1616
? sub () { !!1 }
1717
: sub () { !!0 };
1818
};
@@ -134,7 +134,7 @@ sub unimport
134134
sub _exporter_lexical_installer {
135135
_HAS_NATIVE_LEXICAL_SUB and return sub {
136136
my ( $sigilname, $sym ) = @{ $_[1] };
137-
no warnings ( $] ge '5.037002' ? 'experimental::builtin' : () );
137+
no warnings ( "$]" >= 5.037002 ? 'experimental::builtin' : () );
138138
builtin::export_lexically( $sigilname, $sym );
139139
};
140140
_HAS_MODULE_LEXICAL_SUB and return sub {

meta/DYNAMIC_CONFIG.PL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
$prereq_type = 'requires';
77
}
88

9-
if ( $] ge 5.011002 and $] lt 5.037002 ) {
9+
if ( "$]" >= 5.011002 and "$]" < 5.037002 ) {
1010
$meta->{prereqs}{runtime}{$prereq_type}{'Lexical::Var'} = '0.010';
1111
}
1212

1313
# idk, this should be automatic or summint? put it in explicitly.
1414
$meta->{prereqs}{runtime}{requires}{'Test::More'} = '0.47'
15-
if $] lt 5.006002;
15+
if "$]" < 5.006002;

0 commit comments

Comments
 (0)