Optional::Dependencies::req_group_list (no known users in the wild)
- Protect tests and codebase from incomplete caller() overrides, like
e.g. RT#32640
+ - Stop using bare $] throughout - protects the codebase from issues
+ similar (but likely not limited to) P5#72210
0.082820 2015-03-20 20:35 (UTC)
* Fixes
use List::Util 'first';
use DBIx::Class::_Util 'perlstring';
-use constant HAS_DOR => ( $] < 5.010 ? 0 : 1 );
+use constant HAS_DOR => ( "$]" < 5.010 ? 0 : 1 );
use base 'Exporter';
our @EXPORT_OK = qw(
use warnings;
use strict;
-use constant SPURIOUS_VERSION_CHECK_WARNINGS => ($] < 5.010 ? 1 : 0);
+use constant SPURIOUS_VERSION_CHECK_WARNINGS => ( "$]" < 5.010 ? 1 : 0);
BEGIN {
package # hide from pause
# but of course
BROKEN_FORK => ($^O eq 'MSWin32') ? 1 : 0,
- BROKEN_GOTO => ($] < '5.008003') ? 1 : 0,
+ BROKEN_GOTO => ( "$]" < 5.008003 ) ? 1 : 0,
HAS_ITHREADS => $Config{useithreads} ? 1 : 0,
# During 5.13 dev cycle HELEMs started to leak on copy
# add an escape for these perls ON SMOKERS - a user will still get death
- PEEPEENESS => ( eval { DBICTest::RunMode->is_smoker } && ($] >= 5.013005 and $] <= 5.013006) ),
+ PEEPEENESS => ( eval { DBICTest::RunMode->is_smoker } && ( "$]" >= 5.013005 and "$]" <= 5.013006) ),
SHUFFLE_UNORDERED_RESULTSETS => $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS} ? 1 : 0,
OS_NAME => $^O,
};
- if ($] < 5.009_005) {
+ if ( "$]" < 5.009_005) {
require MRO::Compat;
constant->import( OLD_MRO => 1 );
}
grep {
!/^rdbms_|^dist_/
and
- ($] > 5.008002 or !/^ (?: test_ )? (?: admin | admin_script | replicated ) $/x )
+ ( "$]" > 5.008002 or !/^ (?: test_ )? (?: admin | admin_script | replicated ) $/x )
} keys %{DBIx::Class::Optional::Dependencies->req_group_list}
]);
BEGIN {
unshift @INC, 't/lib';
- if ($] < 5.010) {
+ if ( "$]" < 5.010) {
# Pre-5.10 perls pollute %INC on unsuccesfull module
# require, making it appear as if the module is already
use DBICTest;
plan skip_all => 'DBIC does not actively support threads before perl 5.8.5'
- if $] < '5.008005';
+ if "$]" < 5.008005;
plan skip_all => 'Potential problems on Win32 Perl < 5.14 and Variable::Magic - investigation pending'
- if $^O eq 'MSWin32' && $] < 5.014 && DBICTest::RunMode->is_plain;
+ if $^O eq 'MSWin32' && "$]" < 5.014 && DBICTest::RunMode->is_plain;
# README: If you set the env var to a number greater than 10,
# we will use that many children
use Test::Exception;
plan skip_all => 'DBIC does not actively support threads before perl 5.8.5'
- if $] < '5.008005';
+ if "$]" < 5.008005;
use lib qw(t/lib);
use DBICTest;
use Test::More;
plan skip_all => 'DBIC does not actively support threads before perl 5.8.5'
- if $] < '5.008005';
+ if "$]" < 5.008005;
use Scalar::Util 'weaken';
use lib qw(t/lib);
my ($got, $expect) = @_;
skip "Not testing equality of source containing defined-or operator on this perl $]", 1
- if ($] < 5.010 and$expect =~ m!\Q//=!);
+ if ( "$]" < 5.010 and $expect =~ m!\Q//=! );
$expect =~ s/__NBC__/perlstring($DBIx::Class::ResultSource::RowParser::Util::null_branch_class)/ge;
#$schema->storage->_dbh( $schema->storage->_dbh->clone );
die 'Deliberate exception';
- }, ($] >= 5.013008 )
+ }, ( "$]" >= 5.013008 )
? qr/Deliberate exception/s # temporary until we get the generic exception wrapper rolling
: qr/Deliberate exception.+Rollback failed/s
);
! $pre_poison
or
# I do not understand why but on <= 5.8.8 and on 5.10.0 "$pre_poison && $post_poison" passes...
- ($] > 5.008008 and $] < 5.010000 ) or $] > 5.010000
+ ( "$]" > 5.008008 and "$]" < 5.010000 ) or "$]" > 5.010000
));
is (@w, 2, "Both expected warnings found - \$\@ pre-poison: $pre_poison, post-poison: $post_poison" );
}
sub _possibly_has_bad_overload_performance {
- return $] < 5.008009 && !_has_bug_34925();
+ return( "$]" < 5.008009 and !_has_bug_34925() );
}
# If this next one fails then you almost certainly have a RH derived
'Correct method picked'
);
-if ($] >= 5.010) {
+if ( "$]" >= 5.010 ) {
ok (! $INC{'Class/C3.pm'}, 'No Class::C3 loaded on perl 5.10+');
# Class::C3::Componentised loads MRO::Compat unconditionally to satisfy
BEGIN {
- if ($] < 5.010) {
+ if ( "$]" < 5.010) {
# Pre-5.10 perls pollute %INC on unsuccesfull module
# require, making it appear as if the module is already
if $ENV{PERL5OPT};
plan skip_all => 'Dependency load patterns are radically different before perl 5.10'
- if $] < 5.010;
+ if "$]" < 5.010;
# add what we loaded so far
for (keys %INC) {