1 package DBIx::Class::Componentised;
6 my ($class, $target, @to_inject) = @_;
9 unshift(@{"${target}::ISA"}, grep { $target ne $_ && !$target->isa($_)} @to_inject);
11 my $table = { Class::C3::_dump_MRO_table };
12 eval "package $target; import Class::C3;" unless exists $table->{$target};
13 Class::C3::reinitialize() if defined $table->{$target};
18 my $base = $class->component_base_class;
19 my @comp = map { "${base}::$_" } grep { $_ !~ /^#/ } @_;
20 $class->_load_components(@comp);
23 sub load_own_components {
25 my @comp = map { "${class}::$_" } grep { $_ !~ /^#/ } @_;
26 $class->_load_components(@comp);
29 sub _load_components {
30 my ($class, @comp) = @_;
31 foreach my $comp (@comp) {
35 $class->inject_base($class => @comp);