blib/lib/MooseX/BuildArgs/Meta/Object.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 5 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 7 | 7 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MooseX::BuildArgs::Meta::Object; | ||||||
2 | 1 | 1 | 11982 | use 5.008001; | |||
1 | 5 | ||||||
3 | our $VERSION = '0.08'; | ||||||
4 | |||||||
5 | 1 | 1 | 509 | use Moose::Role; | |||
1 | 4853 | ||||||
1 | 3 | ||||||
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; |