X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=b43d4bff892f7e622761e15df71e231bcfc627b0;hb=7db939decd3929e2800c7ab5ec883cb859b68927;hp=e4768a07b33fa040c06aeeba35aa0f217f3d07e5;hpb=bf726d9cd6f7e53d6b3eb540d899e494f245fb5a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index e4768a0..b43d4bf 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -20,8 +20,8 @@ BEGIN { # prove) but I do not know it offhand, especially on older environments # Go with the safer option if ($INC{'Test/Builder.pm'}) { - local $| = 1; - print "#\n"; + select( ( select(\*STDOUT), $|=1 )[0] ); + print STDOUT "#\n"; } } @@ -349,8 +349,11 @@ sub init_schema { my $schema; if ( - $ENV{DBICTEST_VIA_REPLICATED} &&= - ( !$args{storage_type} && !defined $args{sqlite_use_file} ) + $ENV{DBICTEST_VIA_REPLICATED} &&= ( + !$args{storage_type} + && + ( ! defined $args{sqlite_use_file} or $args{sqlite_use_file} ) + ) ) { $args{storage_type} = ['::DBI::Replicated', { balancer_type => '::Random' }]; $args{sqlite_use_file} = 1;