1 package DBIx::Class::AccessorGroup;
6 use base qw/Class::Accessor::Grouped/;
7 use Scalar::Util qw/weaken blessed/;
11 shift->mk_classaccessor(@_);
14 sub mk_classaccessor {
16 $self->mk_group_accessors('inherited', $_[0]);
17 $self->set_inherited(@_) if @_ > 1;
20 my $successfully_loaded_components;
22 sub get_component_class {
23 my $class = $_[0]->get_inherited($_[1]);
25 # It's already an object, just go for it.
26 return $class if blessed $class;
28 if (defined $class and ! $successfully_loaded_components->{$class} ) {
29 $_[0]->ensure_class_loaded($class);
31 mro::set_mro( $class, 'c3' );
34 $successfully_loaded_components->{$class}
35 = ${"${class}::__LOADED__BY__DBIC__CAG__COMPONENT_CLASS__"}
36 = do { \(my $anon = 'loaded') };
37 weaken($successfully_loaded_components->{$class});
43 sub set_component_class {
44 shift->set_inherited(@_);
51 DBIx::Class::AccessorGroup - See Class::Accessor::Grouped
57 This class now exists in its own right on CPAN as Class::Accessor::Grouped
59 =head1 FURTHER QUESTIONS?
61 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
63 =head1 COPYRIGHT AND LICENSE
65 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
66 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
67 redistribute it and/or modify it under the same terms as the
68 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.