X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=678fe5ec34c64b47c0233d8eb8d06444eeb521fc;hb=7fb16f1a1bf1e7de4098b4f4ac3d061312f6bac3;hp=d900a27eae359708670e698b0de459f331112313;hpb=ea20d0fdf6d84e0d75d557f71cf7d1233b607b4c;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index d900a27..678fe5e 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -67,10 +67,11 @@ compose_connection to create/modify all the existing database classes. =cut sub register_class { - my ($class, $name, $to_register) = @_; - my %reg = %{$class->class_registrations}; + my ($self, $name, $to_register) = @_; + my %reg = %{$self->class_registrations}; $reg{$name} = $to_register; - $class->class_registrations(\%reg); + $self->class_registrations(\%reg); + $to_register->result_source->schema($self); } =head2 registered_classes