Disable the leak tests for perls 5.13.5 and 5.13.6 on *smoker only*
}
use Test::More;
+
+use lib qw(t/lib);
+use DBICTest::RunMode;
BEGIN {
- plan skip_all => '5.13.6 leaks like a sieve (fixed in blead/cefd5c7c)'
- if $] == '5.013006';
+ plan skip_all => "Your perl version $] appears to leak like a sieve - skipping test"
+ if DBICTest::RunMode->peepeeness;
}
use Scalar::Util qw/refaddr reftype weaken/;
use Carp qw/longmess/;
use Try::Tiny;
-use lib qw(t/lib);
-use DBICTest::RunMode;
-
my $have_test_cycle;
BEGIN {
require DBIx::Class::Optional::Dependencies;
}
sub __mk_disconnect_guard {
- return if $] == '5.013006'; # leaks handles, delaying DESTROY, can't work right
+ return if DBICTest::RunMode->peepeeness; # leaks handles, delaying DESTROY, can't work right
my $db_file = shift;
return unless -f $db_file;
}
}
+sub peepeeness {
+ return ! $ENV{DBICTEST_ALL_LEAKS} if defined $ENV{DBICTEST_ALL_LEAKS};
+
+ # don't smoke perls with known issues:
+ if (__PACKAGE__->is_smoker) {
+ if ($] == '5.013006') {
+ # leaky 5.13.6 (fixed in blead/cefd5c7c)
+ return 1;
+ }
+ elsif ($] == '5.013005') {
+ # not sure why this one leaks, but disable anyway - ANDK seems to make it weep
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
# Mimic $Module::Install::AUTHOR
sub is_author {