line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bolts::Injector::Parameter::ByPosition; |
2
|
|
|
|
|
|
|
$Bolts::Injector::Parameter::ByPosition::VERSION = '0.143171'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Inject parameters by position during construction |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
491
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with 'Bolts::Injector'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub pre_inject_value { |
11
|
3
|
|
|
3
|
1
|
4
|
my ($self, $loc, $value, $params) = @_; |
12
|
3
|
|
|
|
|
3
|
push @{ $params }, $value; |
|
3
|
|
|
|
|
10
|
|
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__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.143171 |
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 |