Bolts/Injector/Parameter/ByPosition.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 100% 12 / 12 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
pre_inject_value
1.0
CRAP 1.0
« Bolts/Injector/Parameter/ByName.pm ↑ Summary Bolts/Injector/Store/Hash.pm »
1 package Bolts::Injector::Parameter::ByPosition;
2 1 $Bolts::Injector::Parameter::ByPosition::VERSION = '0.143170';
3 # ABSTRACT: Inject parameters by position during construction
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 with 'Bolts::Injector';
8  
9  
10 sub pre_inject_value {
11 3 ▶ my ($self, $loc, $value, $params) = @_;
Subroutine pre_inject_value: called CC=1 SCAR=0.0
Pod documented
12 3 push @{ $params }, $value;
13 }
14  
15 1 __PACKAGE__->meta->make_immutable;
16  
17 __END__
18  
19 =pod
20  
21 =encoding UTF-8
22  
23 =head1 NAME
24  
25 Bolts::Injector::Parameter::ByPosition - Inject parameters by position during construction
26  
27 =head1 VERSION
28  
29 version 0.143170
30  
31 =head1 SYNOPSIS
32  
33 use Bolts;
34  
35 artifact thing => (
36 class => 'MyApp::Thing',
37 parameters => [
38 dep('other_thing'),
39 ],
40 );
41  
42 =head1 DESCRIPTION
43  
44 Inject parameters by position during construction.
45  
46 =head1 ROLES
47  
48 =over
49  
50 =item *
51  
52 L<Bolts::Injector>
53  
54 =back
55  
56 =head1 METHODS
57  
58 =head2 pre_inject_value
59  
60 Perform the pre-injection of the parameter by position.
61  
62 =head1 AUTHOR
63  
64 Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
65  
66 =head1 COPYRIGHT AND LICENSE
67  
68 This software is copyright (c) 2014 by Qubling Software LLC.
69  
70 This is free software; you can redistribute it and/or modify it under
71 the same terms as the Perl 5 programming language system itself.
72  
73 =cut
« Bolts/Injector/Parameter/ByName.pm ↑ Summary Bolts/Injector/Store/Hash.pm »