[Bast-commits] r4699 - DBIx-Class/0.08/trunk/lib/DBIx/Class

lukes at dev.catalyst.perl.org lukes at dev.catalyst.perl.org
Thu Jul 31 19:26:59 BST 2008


Author: lukes
Date: 2008-07-31 19:26:59 +0100 (Thu, 31 Jul 2008)
New Revision: 4699

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
Log:
switched to just registering extra source rather than removing and reregistering

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-07-31 16:52:32 UTC (rev 4698)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-07-31 18:26:59 UTC (rev 4699)
@@ -913,8 +913,9 @@
   foreach my $moniker ($self->sources) {
     my $source = $self->source($moniker);
     my $new = $source->new($source);
-    $clone->_unregister_source($moniker);
-    $clone->register_source($moniker => $new);
+    # we use extra here as we want to leave the class_mappings as they are
+    # but overwrite the source_registrations entry with the new source
+    $clone->register_extra_source($moniker => $new);
   }
   $clone->storage->set_schema($clone) if $clone->storage;
   return $clone;




More information about the Bast-commits mailing list