From: Peter Rabbitson Date: Sun, 29 Mar 2009 10:06:02 +0000 (+0000) Subject: Revert r5808 - this is NOT a bug, the warning IS correct X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e36ef62d87386df05cb80c5373e405797fe6cbb;p=dbsrgits%2FDBIx-Class-Historic.git Revert r5808 - this is NOT a bug, the warning IS correct --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 413fe78..cf7267d 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -1221,9 +1221,7 @@ calling: sub register_class { my ($self, $moniker, $to_register) = @_; - $self->register_source($moniker => $to_register->result_source_instance, { - _to_register => $to_register - }); + $self->register_source($moniker => $to_register->result_source_instance); } =head2 register_source @@ -1281,11 +1279,7 @@ sub _register_source { if ($source->result_class) { my %map = %{$self->class_mappings}; - my $is_subof = $params->{_to_register} && UNIVERSAL::isa( - $params->{_to_register}, - $source->result_class - ); - if (exists $map{$source->result_class} && !$is_subof) { + if (exists $map{$source->result_class}) { warn $source->result_class . ' already has a source, use register_extra_source for additional sources'; } $map{$source->result_class} = $moniker;