Don't rely on connect_info(), instead fetch the dsn from _dbi_connect_info (which...
Peter Rabbitson [Sun, 9 Nov 2008 16:02:05 +0000 (16:02 +0000)]
todo: ping jnpiorkowski about Replicated::Pool and Replicated::Replicant - it blindly assumes that connect_info->[0] contains the dsn, which might not be the case. Even when using _dbi_connect_info, the first element might be a coderef

t/19quotes_newstyle.t
t/32connect_code_ref.t

index 02c1450..98ef777 100644 (file)
@@ -21,7 +21,7 @@ my $orig_debug = $schema->storage->debug;
 
 diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/));
 
-my $dsn = $schema->storage->connect_info->[0];
+my $dsn = $schema->storage->_dbi_connect_info->[0];
 $schema->connection(
   $dsn,
   undef,
index 9fe0e60..8e174fa 100644 (file)
@@ -11,7 +11,7 @@ plan tests => 1;
 my $normal_schema = DBICTest->init_schema( sqlite_use_file => 1 );
 
 # Steal the dsn, which should be like 'dbi:SQLite:t/var/DBIxClass.db'
-my $normal_dsn = $normal_schema->storage->connect_info->[0];
+my $normal_dsn = $normal_schema->storage->_dbi_connect_info->[0];
 
 # Make sure we have no active connection
 $normal_schema->storage->disconnect;