From: Ash Berlin Date: Tue, 8 May 2007 19:35:36 +0000 (+0000) Subject: Unbreak back-compat X-Git-Tag: v0.08010~150^2~81 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=448f820f2e755def89cb47727a7695ae4aebaa13;p=dbsrgits%2FDBIx-Class.git Unbreak back-compat --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index ae3ab90..883e190 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1264,9 +1264,10 @@ sub new_result { my %new = ( %{ $self->_remove_alias($values, $alias) }, %{ $self->_remove_alias($collapsed_cond, $alias) }, + -source_handle => $self->_source_handle ); - return $self->result_class->new(\%new,$self->_source_handle); + return $self->result_class->new(\%new); } # _collapse_cond diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index a26d34c..ad463eb 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -30,13 +30,15 @@ Creates a new row object from column => value mappings passed as a hash ref =cut sub new { - my ($class, $attrs, $source) = @_; + my ($class, $attrs) = @_; $class = ref $class if ref $class; my $new = { _column_data => {} }; bless $new, $class; - $new->_source_handle($source) if $source; + if (my $handle = delete $attrs->{-source_handle}) { + $new->_source_handle($handle); + } if ($attrs) { $new->throw_exception("attrs must be a hashref")