X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=d704d824556b06c887ece64f4ea0bc2f2592ccd9;hb=fab31d8c753ec27ee5b5a16d1568cc337a245858;hp=a88c52d3fbe2e45ab64d3121a856033c9bb9d6c5;hpb=11b78bd6f6d77f58d9c5ae301e94ca57e892f592;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index a88c52d..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 @@ -88,7 +88,8 @@ sub compose_connection { my %map; while (my ($comp, $comp_class) = each %reg) { my $target_class = "${target}::${comp}"; - $class->inject_base($target_class, $comp_class, $conn_class); + $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"}, @to_inject); - } -} - 1; =back =head1 AUTHORS -Matt S. Trout +Matt S. Trout =head1 LICENSE