DBIx/Class/AccessorGroup.pm

filter: Statementstmt 100% 30 / 30 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 8 / 8 Podpod 100% 2 / 2 totaltotal 100% 49 / 49 CC 4 SCAR 7.4
CC
4
Cov
100%
get_component_class
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« DBIx/Class/InflateColumn/File.pm ↑ Summary DBIx/Class/ResultSource/View.pm »
1 package DBIx::Class::AccessorGroup;
2  
3 383 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 383 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 383 ▶use base qw/Class::Accessor::Grouped/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 383 ▶use Scalar::Util qw/weaken blessed/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 383 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 383 my $successfully_loaded_components;
11  
12 104067 ▶sub get_component_class {
Subroutine get_component_class: called CC=4 SCAR=13.9
Pod documented
13 104067 my $class = $_[0]->get_inherited($_[1]);
14  
15 # It's already an object, just go for it.
16 104067 ▶ return $class if blessed $class;
Branch: 1 branch
BranchTrueFalseTotal
if builtin::blessed($class) 2 104065 104067
17  
18 104065 ▶ if (defined $class and ! $successfully_loaded_components->{$class} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $class and not $successfully_loaded_components->{$class}) 25338 78727 104065
Condition100%3/3
defined $class and not $successfully_loaded_components->{$class}
!ll&&!rl&&r
27872525338
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}
ABresult
0X0
100
111
19 25338 $_[0]->ensure_class_loaded($class);
20  
21 383 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
22 $successfully_loaded_components->{$class}
23 25337 = ${"${class}::__LOADED__BY__DBIC__CAG__COMPONENT_CLASS__"}
24 25337 = do { \(my $anon = 'loaded') };
25 25337 weaken($successfully_loaded_components->{$class});
26 }
27  
28 104064 $class;
29 };
30  
31 1949 ▶sub set_component_class {
Subroutine set_component_class: called CC=1 SCAR=0.0
Pod documented
32 1949 shift->set_inherited(@_);
33 }
34  
35 383 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 FURTHER QUESTIONS?
48  
49 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
50  
51 =head1 COPYRIGHT AND LICENSE
52  
53 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
54 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
55 redistribute it and/or modify it under the same terms as the
56 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
57  
58 =cut
« DBIx/Class/InflateColumn/File.pm ↑ Summary DBIx/Class/ResultSource/View.pm »