blib/lib/MooseX/BuildArgs/Meta/Object.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 3 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 1 | 1 | 100.0 |
pod | n/a | ||
total | 4 | 4 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MooseX::BuildArgs::Meta::Object; | ||||||
2 | |||||||
3 | $MooseX::BuildArgs::Meta::Object::VERSION = '0.07'; | ||||||
4 | |||||||
5 | 1 | 1 | 10336 | use Moose::Role; | |||
1 | 4180 | ||||||
1 | 4 | ||||||
6 | |||||||
7 | has build_args => ( | ||||||
8 | is => 'ro', | ||||||
9 | isa => 'HashRef', | ||||||
10 | required => 1, | ||||||
11 | init_arg => '_build_args', | ||||||
12 | ); | ||||||
13 | |||||||
14 | around BUILDARGS => sub{ | ||||||
15 | my $orig = shift; | ||||||
16 | my $self = shift; | ||||||
17 | |||||||
18 | my $args = $self->$orig( @_ ); | ||||||
19 | |||||||
20 | $args->{_build_args} = { %$args }; | ||||||
21 | |||||||
22 | return $args; | ||||||
23 | }; | ||||||
24 | |||||||
25 | 1; |