Revision history for DBIx::Class
+ * Fixes
+ - Fix a Storage/$dbh leak introduced by th migration to
+ Try::Tiny (this is *not* a Try::Tiny bug)
+
* Misc
- Test suite default on-disk database now checks for Win32
fail-conditions even when running on other OSes
$DBI::connect_via = 'connect';
}
- try {
+ # FIXME - this should have been Try::Tiny, but triggers a leak-bug in perl(!)
+ # related to coderef refcounting. A failing test has been submitted to T::T
+ my $connect_ok = eval {
if(ref $info[0] eq 'CODE') {
$dbh = $info[0]->();
}
$dbh->{RaiseError} = 1;
$dbh->{PrintError} = 0;
}
- }
- catch {
- $self->throw_exception("DBI Connection failed: $_")
- }
- finally {
- $DBI::connect_via = $old_connect_via if $old_connect_via;
+
+ 1;
};
+ my $possible_err = $@;
+ $DBI::connect_via = $old_connect_via if $old_connect_via;
+
+ unless ($connect_ok) {
+ $self->throw_exception("DBI Connection failed: $possible_err")
+ }
+
$self->_dbh_autocommit($dbh->{AutoCommit});
$dbh;
}