[Bast-commits] r5862 -
DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class
jmmills at dev.catalyst.perl.org
jmmills at dev.catalyst.perl.org
Wed Apr 8 19:26:57 GMT 2009
Author: jmmills
Date: 2009-04-08 20:26:57 +0100 (Wed, 08 Apr 2009)
New Revision: 5862
Modified:
DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm
Log:
patch for no-op, further testing required.
Modified: DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm 2009-04-08 02:47:47 UTC (rev 5861)
+++ DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm 2009-04-08 19:26:57 UTC (rev 5862)
@@ -1267,6 +1267,7 @@
sub _register_source {
my ($self, $moniker, $source, $params) = @_;
+ my $orig_source = $source;
$source = $source->new({ %$source, source_name => $moniker });
my %reg = %{$self->source_registrations};
@@ -1279,7 +1280,7 @@
if ($source->result_class) {
my %map = %{$self->class_mappings};
- if (exists $map{$source->result_class}) {
+ if (exists $map{$source->result_class} && $orig_source ne $source->result_class->result_source_instance) {
warn $source->result_class . ' already has a source, use register_extra_source for additional sources';
}
$map{$source->result_class} = $moniker;
More information about the Bast-commits
mailing list