From: Matt S Trout Date: Tue, 21 Aug 2007 18:25:33 +0000 (+0000) Subject: Merge 'on_disconnect_do' into 'trunk' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5322ea52d80043df028d7b7670bc0db5aeafc8a1;p=dbsrgits%2FDBIx-Class-Historic.git Merge 'on_disconnect_do' into 'trunk' --- 5322ea52d80043df028d7b7670bc0db5aeafc8a1 diff --cc lib/DBIx/Class/Storage/DBI.pm index 82859f2,bc63abf..9e621ab --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@@ -13,12 -13,10 +13,12 @@@ use Scalar::Util qw/blessed weaken/ __PACKAGE__->mk_group_accessors('simple' => qw/_connect_info _dbi_connect_info _dbh _sql_maker _sql_maker_opts - _conn_pid _conn_tid disable_sth_caching cursor on_connect_do + _conn_pid _conn_tid disable_sth_caching on_connect_do - transaction_depth unsafe _dbh_autocommit/ + on_disconnect_do transaction_depth unsafe _dbh_autocommit/ ); +__PACKAGE__->cursor_class('DBIx::Class::Storage::DBI::Cursor'); + BEGIN { package DBIC::SQL::Abstract; # Would merge upstream, but nate doesn't reply :( @@@ -481,9 -501,9 +502,10 @@@ sub connect_info my $last_info = $dbi_info->[-1]; if(ref $last_info eq 'HASH') { $last_info = { %$last_info }; # so delete is non-destructive - for my $storage_opt ( - qw/on_connect_do disable_sth_caching unsafe cursor_class/ - ) { - my @storage_option = - qw/on_connect_do on_disconnect_do disable_sth_caching unsafe/; ++ my @storage_option = qw( ++ on_connect_do on_disconnect_do disable_sth_caching unsafe cursor_class ++ ); + for my $storage_opt (@storage_option) { if(my $value = delete $last_info->{$storage_opt}) { $self->$storage_opt($value); }