Streamline connection codepath, fix $ENV{DBI_DSN} regression from d87929a4
authorPeter Rabbitson <ribasushi@cpan.org>
Tue, 10 Dec 2013 03:53:44 +0000 (04:53 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Tue, 10 Dec 2013 08:20:59 +0000 (09:20 +0100)
commit37b5ab5186b53c5e786e32127d2589bd6dc9b3e0
tree853b639f0e6d5b294b2a65f0a7eb10b7e2070195
parentf9ae57dcbdcc14d907863fdb60af95f9b2c1edb7
Streamline connection codepath, fix $ENV{DBI_DSN} regression from d87929a4

Break out _dbi_connect_info to always take into account $ENV{DBI_DSN} on
a case-by-case basis. This allows to centralize handling of "whose driver
is this anyway" and let more exotic configs still function properly. As a
side effect need to move the _dbi_connect_info() population earlier in the
connect_info() codepath

Also break out the DBI_DRIVER reader, and use it if possible in the
_describe_connection codepath

Additionaly refactor of _connect since there is no point passing the DSN when
we can grab it from $self (this also fixed ::Replicated's _connect() loop
never actually having worked)
Changes
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/Replicated.pm
lib/DBIx/Class/Storage/DBI/Sybase.pm
maint/gen_sqlite_schema_files
t/storage/base.t
t/storage/dbi_env.t
t/storage/deploy.t