X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=d704d824556b06c887ece64f4ea0bc2f2592ccd9;hb=73f581237f9fb7bf1e0233e50530321fb7f5d6e1;hp=5c9952500e50b02a3ffd6f6aa95296e3580c3b56;hpb=f753fd2ef5b4e2df0eb074496b252165283a6a4f;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 5c99525..d704d82 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -6,7 +6,7 @@ use warnings; use base qw/Class::Data::Inheritable/; use base qw/DBIx::Class/; -__PACKAGE__->load_components(qw/Exception/); +__PACKAGE__->load_components(qw/Exception Componentised/); __PACKAGE__->mk_classdata('class_registrations' => {}); =head1 NAME @@ -89,6 +89,7 @@ sub compose_connection { while (my ($comp, $comp_class) = each %reg) { my $target_class = "${target}::${comp}"; $class->inject_base($target_class, $conn_class, $comp_class); + $target_class->table($comp_class->table); @map{$comp, $comp_class} = ($target_class, $target_class); } { @@ -109,21 +110,13 @@ sub setup_connection_class { $target->connection(@info); } -sub inject_base { - my ($class, $target, @to_inject) = @_; - { - no strict 'refs'; - unshift(@{"${target}::ISA"}, grep { $target ne $_ } @to_inject); - } -} - 1; =back =head1 AUTHORS -Matt S. Trout +Matt S. Trout =head1 LICENSE