From: Brandon L. Black Date: Thu, 3 May 2007 03:02:14 +0000 (+0000) Subject: revert part of 3220, apparently it is breaking cloning behavior in subtle ways that... X-Git-Tag: v0.08010~159 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96c95414e00a7d3726185a0a0459588c689bfb17;p=dbsrgits%2FDBIx-Class.git revert part of 3220, apparently it is breaking cloning behavior in subtle ways that we have no tests for --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 5f69862..b5ab0e0 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -91,11 +91,15 @@ moniker. sub register_source { my ($self, $moniker, $source) = @_; - $self->source_registrations->{$moniker} = $source; + my %reg = %{$self->source_registrations}; + $reg{$moniker} = $source; + $self->source_registrations(\%reg); $source->schema($self); weaken($source->{schema}) if ref($self); if ($source->result_class) { - $self->class_mappings->{$source->result_class} = $moniker; + my %map = %{$self->class_mappings}; + $map{$source->result_class} = $moniker; + $self->class_mappings(\%map); } }