PluginKit/ConsumerBase.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 5 totaltotal 68.4% 26 / 38 CC 2 SCAR 4.1
CC
2
Cov
83%
new
2.0
NORMALIZE_BUILDARGS
2.0
TRANSFORM_BUILDARGS
2.0
CRAP 1.5
« PluginKit.pm ↑ Summary PluginKit/ConsumerRole.pm »
1 package MooX::PluginKit::ConsumerBase;
2 3 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 our $VERSION = '0.06';
5  
6 =head1 NAME
7  
8 MooX::PluginKit::ConsumerBase - Parent class for PluginKit consumers.
9  
10 =head2 DESCRIPTION
11  
12 This module is a total hack to get around
13 L<MooX::PluginKit/Cleanly Alter Constructor>.
14  
15 =cut
16  
17 3 ▶use Moo::Object qw();
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 18 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 18 my $class = shift;
23  
24 18 my $args = $class->BUILDARGS( @_ );
25 18 my $factory = $args->{plugin_factory};
26 18 ▶ $class = $factory->build_class( $class ) if $factory;
Branch: 1 branch
BranchTrueFalseTotal
if $factory 18 0 18
27  
28 18 return bless {}, $class;
29 }
30  
31 36 ▶sub BUILDARGS { Moo::Object::BUILDARGS(@_) }
Subroutine BUILDARGS: called CC=1 SCAR=0.0
Pod undocumented
32 0 ▶sub NORMALIZE_BUILDARGS { Moo::Object::NORMALIZE_BUILDARGS(@_) }
Subroutine NORMALIZE_BUILDARGS: not called CC=1 SCAR=6.9
Pod undocumented
33 0 ▶sub TRANSFORM_BUILDARGS { Moo::Object::TRANSFORM_BUILDARGS(@_) }
Subroutine TRANSFORM_BUILDARGS: not called CC=1 SCAR=6.9
Pod undocumented
34 0 ▶sub FINALIZE_BUILDARGS { Moo::Object::FINALIZE_BUILDARGS(@_) }
Subroutine FINALIZE_BUILDARGS: not called CC=1 SCAR=6.9
Pod undocumented
35  
36 3 1;
37 __END__
« PluginKit.pm ↑ Summary PluginKit/ConsumerRole.pm »