From: Ash Berlin Date: Tue, 8 May 2007 19:41:38 +0000 (+0000) Subject: Move -result_source handling further up X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9fe476ba294d57883ca109553bcaf2c6072740a;p=dbsrgits%2FDBIx-Class-Historic.git Move -result_source handling further up --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index ad463eb..66c6cfb 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -39,6 +39,9 @@ sub new { if (my $handle = delete $attrs->{-source_handle}) { $new->_source_handle($handle); } + if (my $source = delete $attrs->{-result_source}) { + $new->result_source($source); + } if ($attrs) { $new->throw_exception("attrs must be a hashref") @@ -66,9 +69,6 @@ sub new { unless $class->has_column($key); $new->store_column($key => $attrs->{$key}); } - if (my $source = delete $attrs->{-result_source}) { - $new->result_source($source); - } $new->{_relationship_data} = $related if $related; $new->{_inflated_column} = $inflated if $inflated;