From: Matt S Trout Date: Thu, 20 May 2010 17:19:14 +0000 (+0000) Subject: don't try and ensure_class_loaded an object. this doesn't work. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ea691c3672ff983feff498248e885ba59ea16a6;p=dbsrgits%2FDBIx-Class-Historic.git don't try and ensure_class_loaded an object. this doesn't work. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 1dc4068..4343a4f 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1138,7 +1138,9 @@ in the original source class will not run. sub result_class { my ($self, $result_class) = @_; if ($result_class) { - $self->ensure_class_loaded($result_class); + unless (ref $result_class) { # don't fire this for an object + $self->ensure_class_loaded($result_class); + } $self->_result_class($result_class); $self->{attrs}{result_class} = $result_class if ref $self; }