Board/BlockInjection.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
get
1.0
BEGIN
1.0
CRAP 1.0
« Board/Service/Alias.pm ↑ Summary Board/ConstructorInjection.pm »
1 package Bread::Board::BlockInjection;
2 59 our $AUTHORITY = 'cpan:STEVAN';
3 # ABSTRACT: service instantiated via custom subroutine
4 59 $Bread::Board::BlockInjection::VERSION = '0.37';
5 59 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 59 with 'Bread::Board::Service::WithParameters',
8 'Bread::Board::Service::WithDependencies',
9 'Bread::Board::Service::WithClass';
10  
11 59 has 'block' => (
12 is => 'rw',
13 isa => 'CodeRef',
14 required => 1,
15 );
16  
17  
18 53 ▶sub get {
Subroutine get: called CC=1 SCAR=0.0
19 53 my $self = shift;
20 53 $self->block->($self)
21 }
22  
23 59 __PACKAGE__->meta->make_immutable;
24  
25 59 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 __END__
« Board/Service/Alias.pm ↑ Summary Board/ConstructorInjection.pm »