File Coverage

blib/lib/MooX/PluginKit/ConsumerBase.pm
Criterion Covered Total %
statement 17 20 85.0
branch 1 2 50.0
condition n/a
subroutine 6 9 66.6
pod 0 5 0.0
total 24 36 66.6


line stmt bran cond sub pod time code
1             package MooX::PluginKit::ConsumerBase;
2 3     3   1586 use 5.008001;
  3         10  
3 3     3   19 use strictures 2;
  3         28  
  3         116  
4             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.
14              
15             =cut
16              
17 3     3   749 use Moo::Object qw();
  3         7  
  3         50  
18              
19 3     3   13 use namespace::clean;
  3         7  
  3         14  
20              
21             sub new {
22 18     18 0 180 my $class = shift;
23              
24 18         342 my $args = $class->BUILDARGS( @_ );
25 18         40 my $factory = $args->{plugin_factory};
26 18 50       87 $class = $factory->build_class( $class ) if $factory;
27              
28 18         5359 return bless {}, $class;
29             }
30              
31 36     36 0 107 sub BUILDARGS { Moo::Object::BUILDARGS(@_) }
32 0     0 0   sub NORMALIZE_BUILDARGS { Moo::Object::NORMALIZE_BUILDARGS(@_) }
33 0     0 0   sub TRANSFORM_BUILDARGS { Moo::Object::TRANSFORM_BUILDARGS(@_) }
34 0     0 0   sub FINALIZE_BUILDARGS { Moo::Object::FINALIZE_BUILDARGS(@_) }
35              
36             1;
37             __END__