blib/lib/MooseX/ExtraArgs/Meta/ToClass.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::ExtraArgs::Meta::ToClass; | ||||||
2 | |||||||
3 | $MooseX::ExtraArgs::Meta::ToClass::VERSION = '0.02'; | ||||||
4 | |||||||
5 | 1 | 1 | 5121 | use Moose::Role; | |||
1 | 2 | ||||||
1 | 8 | ||||||
6 | |||||||
7 | around apply => sub { | ||||||
8 | my $orig = shift; | ||||||
9 | my $self = shift; | ||||||
10 | my $from_role = shift; | ||||||
11 | my $to_class = shift; | ||||||
12 | |||||||
13 | Moose::Util::MetaRole::apply_base_class_roles( | ||||||
14 | for => $to_class, | ||||||
15 | roles => ['MooseX::ExtraArgs::Meta::Object'], | ||||||
16 | ); | ||||||
17 | |||||||
18 | return $self->$orig( $from_role, $to_class ); | ||||||
19 | }; | ||||||
20 | |||||||
21 | 1; |