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
\.orig$
# Dont use Module::Build anymore
-# Build.PL
+^Build.PL$
# 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) = @_;
return sprintf($sql, @args);
}
-package DBIx::ContextualFetch::st;
+package
+ DBIx::ContextualFetch::st; # HIDE FROM PAUSE THIS IS NOT OUR CLASS
no warnings 'redefine';
return $version;
}
+sub connection {
+ my $self = shift;
+ $self->next::method(@_);
+ $self->_on_connect;
+ return $self;
+}
+
sub _on_connect
{
my ($self) = @_;
my $vtable = $vschema->resultset('Table');
my $pversion;
- if(!$self->exists($vtable))
+ if(!$self->_source_exists($vtable))
{
# $vschema->storage->debug(1);
$vschema->storage->ensure_connected();
# $self->upgrade($pversion, $self->schema_version);
}
-sub exists
+sub _source_exists
{
my ($self, $rs) = @_;
'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.
# $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(
## 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";
use Test::More;
use lib qw(t/lib);
use DBICTest;
-use DateTime;
my $schema = DBICTest->init_schema();