Bolts/Injector/Parameter/ByName.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 15 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
_build_name
1.0
pre_inject_value
1.0
CRAP 1.0
« Bolts/Inference.pm ↑ Summary Bolts/Injector/Parameter/ByPosition.pm »
1 package Bolts::Injector::Parameter::ByName;
2 11 $Bolts::Injector::Parameter::ByName::VERSION = '0.143171';
3 # ABSTRACT: Inject parameters by name during construction
4  
5 11 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 with 'Bolts::Injector';
8  
9  
10 11 has name => (
11 is => 'ro',
12 isa => 'Str',
13 lazy_build => 1,
14 );
15  
16 57 ▶sub _build_name { $_[0]->key }
Subroutine _build_name: called CC=1 SCAR=0.0
17  
18  
19 525 ▶sub pre_inject_value {
Subroutine pre_inject_value: called CC=1 SCAR=0.0
Pod documented
20 525 my ($self, $loc, $value, $params) = @_;
21 525 push @{ $params }, $self->name, $value;
22 }
23  
24 11 __PACKAGE__->meta->make_immutable;
25  
26 __END__
« Bolts/Inference.pm ↑ Summary Bolts/Injector/Parameter/ByPosition.pm »