1 package DBIx::Class::Componentised;
6 my ($class, $target, @to_inject) = @_;
9 unshift(@{"${target}::ISA"}, grep { $target ne $_ } @to_inject);
11 my $table = { Class::C3::_dump_MRO_table };
12 eval "package $target; use Class::C3;" unless exists $table->{$target};
13 Class::C3::reinitialize() if defined $table->{$target};
18 my @comp = map { "DBIx::Class::$_" } grep { $_ !~ /^#/ } @_;
19 $class->_load_components(@comp);
22 sub load_own_components {
24 my @comp = map { "${class}::$_" } grep { $_ !~ /^#/ } @_;
25 $class->_load_components(@comp);
28 sub _load_components {
29 my ($class, @comp) = @_;
30 foreach my $comp (@comp) {
34 $class->inject_base($class => @comp);