From: Ash Berlin Date: Tue, 21 Nov 2006 20:58:19 +0000 (+0000) Subject: Missed a reference to {result_source} X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6aba697fe0c11d0b81dc810c649b9b4b9ee09410;p=dbsrgits%2FDBIx-Class-Historic.git Missed a reference to {result_source} --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 11c3dd1..6cee23f 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -67,9 +67,9 @@ L). sub insert { my ($self) = @_; return $self if $self->in_storage; - $self->{result_source} ||= $self->result_source_instance + my $source = $self->result_source; + $source ||= $self->result_source($self->result_source_instance) if $self->can('result_source_instance'); - my $source = $self->{result_source}; $self->throw_exception("No result_source set on this object; can't insert") unless $source; #use Data::Dumper; warn Dumper($self);