[Bast-commits] r8301 - in DBIx-Class/0.08/branches/prefetch/t: .
inflate prefetch sqlahacks/quotes storage
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Jan 13 21:33:41 GMT 2010
Author: ribasushi
Date: 2010-01-13 21:33:41 +0000 (Wed, 13 Jan 2010)
New Revision: 8301
Modified:
DBIx-Class/0.08/branches/prefetch/t/26dumper.t
DBIx-Class/0.08/branches/prefetch/t/76joins.t
DBIx-Class/0.08/branches/prefetch/t/inflate/file_column.t
DBIx-Class/0.08/branches/prefetch/t/prefetch/multiple_hasmany.t
DBIx-Class/0.08/branches/prefetch/t/prefetch/standard.t
DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes.t
DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes_newstyle.t
DBIx-Class/0.08/branches/prefetch/t/storage/debug.t
Log:
Get rid of IO::File invocations
Modified: DBIx-Class/0.08/branches/prefetch/t/26dumper.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/26dumper.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/26dumper.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -1,6 +1,5 @@
use strict;
use Test::More;
-use IO::File;
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
Modified: DBIx-Class/0.08/branches/prefetch/t/76joins.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/76joins.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/76joins.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -10,8 +10,6 @@
my $orig_debug = $schema->storage->debug;
-use IO::File;
-
BEGIN {
eval "use DBD::SQLite";
plan $@
Modified: DBIx-Class/0.08/branches/prefetch/t/inflate/file_column.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/inflate/file_column.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/inflate/file_column.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -4,7 +4,6 @@
use Test::More;
use lib qw(t/lib);
use DBICTest;
-use IO::File;
use File::Compare;
use Path::Class qw/file/;
Modified: DBIx-Class/0.08/branches/prefetch/t/prefetch/multiple_hasmany.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/prefetch/multiple_hasmany.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/prefetch/multiple_hasmany.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -5,7 +5,6 @@
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
-use IO::File;
my $schema = DBICTest->init_schema();
my $sdebug = $schema->storage->debug;
Modified: DBIx-Class/0.08/branches/prefetch/t/prefetch/standard.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/prefetch/standard.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/prefetch/standard.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -5,7 +5,6 @@
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
-use IO::File;
my $schema = DBICTest->init_schema();
my $orig_debug = $schema->storage->debug;
Modified: DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -2,7 +2,6 @@
use warnings;
use Test::More;
-use IO::File;
use lib qw(t/lib);
use DBIC::SqlMakerTest;
Modified: DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes_newstyle.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes_newstyle.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/sqlahacks/quotes/quotes_newstyle.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -2,7 +2,6 @@
use warnings;
use Test::More;
-use IO::File;
use lib qw(t/lib);
use DBIC::SqlMakerTest;
Modified: DBIx-Class/0.08/branches/prefetch/t/storage/debug.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/storage/debug.t 2010-01-13 21:32:47 UTC (rev 8300)
+++ DBIx-Class/0.08/branches/prefetch/t/storage/debug.t 2010-01-13 21:33:41 UTC (rev 8301)
@@ -6,25 +6,19 @@
use DBICTest;
use DBIC::DebugObj;
use DBIC::SqlMakerTest;
+use Path::Class qw/file/;
my $schema = DBICTest->init_schema();
-plan tests => 7;
ok ( $schema->storage->debug(1), 'debug' );
-ok ( defined(
- $schema->storage->debugfh(
- IO::File->new('t/var/sql.log', 'w')
- )
- ),
- 'debugfh'
- );
+$schema->storage->debugfh(file('t/var/sql.log')->openw);
$schema->storage->debugfh->autoflush(1);
my $rs = $schema->resultset('CD')->search({});
$rs->count();
-my $log = new IO::File('t/var/sql.log', 'r') or die($!);
+my $log = file('t/var/sql.log')->openr;
my $line = <$log>;
$log->close();
ok($line =~ /^SELECT COUNT/, 'Log success');
@@ -33,7 +27,7 @@
$ENV{'DBIC_TRACE'} = '=t/var/foo.log';
$rs = $schema->resultset('CD')->search({});
$rs->count();
-$log = new IO::File('t/var/foo.log', 'r') or die($!);
+$log = file('t/var/foo.log')->openr;
$line = <$log>;
$log->close();
ok($line =~ /^SELECT COUNT/, 'Log success');
@@ -70,4 +64,4 @@
);
}
-1;
+done_testing;
More information about the Bast-commits
mailing list