| 1 | package DBIx::Class::AccessorGroup; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 308 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 308 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 308 | ▶ | use base qw/Class::Accessor::Grouped/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 308 | ▶ | use Scalar::Util qw/weaken blessed/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 308 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 308 | my $successfully_loaded_components; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | sub get_component_class { | ||||||||||||||||||||||||||||
| 13 | 97937 | ▶ | my $class = $_[0]->get_inherited($_[1]); | ||||||||||||||||||||||||||
|
Subroutine
get_component_class: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | # It's already an object, just go for it. | ||||||||||||||||||||||||||||
| 16 | 97937 | ▶ | return $class if blessed $class; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 97935 | ▶ | if (defined $class and ! $successfully_loaded_components->{$class} ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $class and not $successfully_loaded_components->{$class}
MC/DC100%2/2
defined $class and not $successfully_loaded_components->{$class}
defined $class
not $successfully_loaded_components->{$class}
Truth table100%3/3
A and not(B)
A= defined $classB= not $successfully_loaded_components->{$class}
| |||||||||||||||||||||||||||||
| 19 | 23995 | $_[0]->ensure_class_loaded($class); | |||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 308 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | $successfully_loaded_components->{$class} | ||||||||||||||||||||||||||||
| 23 | 23994 | = ${"${class}::__LOADED__BY__DBIC__CAG__COMPONENT_CLASS__"} | |||||||||||||||||||||||||||
| 24 | 23994 | = do { \(my $anon = 'loaded') }; | |||||||||||||||||||||||||||
| 25 | 23994 | weaken($successfully_loaded_components->{$class}); | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 97934 | $class; | |||||||||||||||||||||||||||
| 29 | }; | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | sub set_component_class { | ||||||||||||||||||||||||||||
| 32 | 1770 | ▶ | shift->set_inherited(@_); | ||||||||||||||||||||||||||
|
Subroutine
set_component_class: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 308 | 1; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | =head1 NAME | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | DBIx::Class::AccessorGroup - See Class::Accessor::Grouped | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | This class now exists in its own right on CPAN as Class::Accessor::Grouped | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | =head1 AUTHOR AND CONTRIBUTORS | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | =head1 LICENSE | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | You may distribute this code under the same terms as Perl itself. | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | =cut | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||