From: Brandon L. Black Date: Tue, 29 May 2007 18:04:38 +0000 (+0000) Subject: make sure we take fresh copies of connect_info, safer than letting people mod it... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdad5fab5f1d4f151b71205a46b839bcf1c28230;p=dbsrgits%2FDBIx-Class-Historic.git make sure we take fresh copies of connect_info, safer than letting people mod it out from under us --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index c7ece60..27b115b 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -464,10 +464,9 @@ sub connect_info { # the new set of options $self->_sql_maker(undef); $self->_sql_maker_opts({}); - $self->_connect_info($info_arg); + $self->_connect_info([@$info_arg]); # copy for _connect_info - my $dbi_info = [@$info_arg]; # copy for DBI - $self->_dbi_connect_info($dbi_info); + my $dbi_info = [@$info_arg]; # copy for _dbi_connect_info my $last_info = $dbi_info->[-1]; if(ref $last_info eq 'HASH') { @@ -485,8 +484,9 @@ sub connect_info { # Get rid of any trailing empty hashref pop(@$dbi_info) if !keys %$last_info; } + $self->_dbi_connect_info($dbi_info); - $info_arg; + $self->_connect_info; } =head2 on_connect_do