From: Peter Rabbitson Date: Sun, 9 Nov 2008 16:02:05 +0000 (+0000) Subject: Don't rely on connect_info(), instead fetch the dsn from _dbi_connect_info (which... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee3bc4eaabcd4be6112c9bcb6278b0db1eda20d0;p=dbsrgits%2FDBIx-Class-Historic.git Don't rely on connect_info(), instead fetch the dsn from _dbi_connect_info (which is stable no matter which connect_info() flavor is used) 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 --- diff --git a/t/19quotes_newstyle.t b/t/19quotes_newstyle.t index 02c1450..98ef777 100644 --- a/t/19quotes_newstyle.t +++ b/t/19quotes_newstyle.t @@ -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, diff --git a/t/32connect_code_ref.t b/t/32connect_code_ref.t index 9fe0e60..8e174fa 100644 --- a/t/32connect_code_ref.t +++ b/t/32connect_code_ref.t @@ -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;