From: Matt S Trout Date: Sun, 17 Jun 2007 21:13:23 +0000 (+0000) Subject: 0.08001 because I'm an idiot X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a28009914a3e447af53737d503b1953160d146c9;p=dbsrgits%2FDBIx-Class-Historic.git 0.08001 because I'm an idiot --- diff --git a/Changes b/Changes index 47a3f59..43a46e9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for DBIx::Class +0.08001 2007-06-17 21:21:02 + - Cleaned up on_connect handling for versioned + - removed DateTime use line from multi_create test + - hid DBIx::ContextualFetch::st override in CDBICompat + 0.08000 2007-06-17 18:06:12 - Fixed DBIC_TRACE debug filehandles to set ->autoflush(1) - Fixed circular dbh<->storage in HandleError with weakref diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index b174c1d..972ae18 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -45,4 +45,4 @@ \.orig$ # Dont use Module::Build anymore -# Build.PL +^Build.PL$ diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index d4fbada..9f55fc6 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -18,7 +18,7 @@ sub component_base_class { 'DBIx::Class' } # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports # brain damage and presumably various other packaging systems too -$VERSION = '0.08000'; +$VERSION = '0.08001'; sub MODIFY_CODE_ATTRIBUTES { my ($class,$code,@attrs) = @_; diff --git a/lib/DBIx/Class/CDBICompat/ImaDBI.pm b/lib/DBIx/Class/CDBICompat/ImaDBI.pm index ea08098..880eb9d 100644 --- a/lib/DBIx/Class/CDBICompat/ImaDBI.pm +++ b/lib/DBIx/Class/CDBICompat/ImaDBI.pm @@ -108,7 +108,8 @@ sub transform_sql { return sprintf($sql, @args); } -package DBIx::ContextualFetch::st; +package + DBIx::ContextualFetch::st; # HIDE FROM PAUSE THIS IS NOT OUR CLASS no warnings 'redefine'; diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index ea662b3..6966e5b 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -60,6 +60,13 @@ sub schema_version { return $version; } +sub connection { + my $self = shift; + $self->next::method(@_); + $self->_on_connect; + return $self; +} + sub _on_connect { my ($self) = @_; @@ -67,7 +74,7 @@ sub _on_connect my $vtable = $vschema->resultset('Table'); my $pversion; - if(!$self->exists($vtable)) + if(!$self->_source_exists($vtable)) { # $vschema->storage->debug(1); $vschema->storage->ensure_connected(); @@ -146,7 +153,7 @@ sub _on_connect # $self->upgrade($pversion, $self->schema_version); } -sub exists +sub _source_exists { my ($self, $rs) = @_; diff --git a/t/03podcoverage.t b/t/03podcoverage.t index 106fece..aefceb2 100644 --- a/t/03podcoverage.t +++ b/t/03podcoverage.t @@ -75,9 +75,9 @@ my $exceptions = { 'DBIx::Class::InflateColumn::File' => { skip => 1 }, -# skipped because two methods may not need to be public +# skip connection since it's just an override - 'DBIx::Class::Schema::Versioned' => { ignore => [ qw(on_connect exists) ] }, + 'DBIx::Class::Schema::Versioned' => { ignore => [ qw(connection) ] }, # must kill authors. diff --git a/t/94versioning.t b/t/94versioning.t index 697e5b2..7de9edd 100644 --- a/t/94versioning.t +++ b/t/94versioning.t @@ -37,7 +37,7 @@ ok(-f 't/var/DBICVersion-Schema-1.0-SQLite.sql', 'Created DDL file'); # $schema->deploy(); my $tvrs = $schema_orig->resultset('Table'); -is($schema_orig->exists($tvrs), 1, 'Created schema from DDL file'); +is($schema_orig->_source_exists($tvrs), 1, 'Created schema from DDL file'); eval "use DBICVersionNew"; my $schema_new = DBICVersion::Schema->connect( @@ -63,7 +63,7 @@ my $schema_upgrade = DBICVersion::Schema->connect( ## do this here or let Versioned.pm do it? $schema_upgrade->upgrade(); $tvrs = $schema_upgrade->resultset('Table'); -is($schema_upgrade->exists($tvrs), 1, 'Upgraded schema from DDL file'); +is($schema_upgrade->_source_exists($tvrs), 1, 'Upgraded schema from DDL file'); unlink($db_file) if -e $db_file; unlink($db_file . "-journal") if -e $db_file . "-journal"; diff --git a/t/96multi_create.t b/t/96multi_create.t index ac5f219..23badf9 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -4,7 +4,6 @@ use warnings; use Test::More; use lib qw(t/lib); use DBICTest; -use DateTime; my $schema = DBICTest->init_schema();