File Coverage

blib/lib/MooseX/ExtraArgs/Meta/ToRole.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 # Hide from the indexer for now until docs are added later.
2             MooseX::ExtraArgs::Meta::ToRole;
3 1     1   4749 use Moose::Role;
  1         3  
  1         8  
4              
5             around apply => sub{
6             my $orig = shift;
7             my $self = shift;
8             my $from_role = shift;
9             my $to_role = shift;
10              
11             $to_role = Moose::Util::MetaRole::apply_metaroles(
12             for => $to_role,
13             role_metaroles => {
14             application_to_class => ['MooseX::ExtraArgs::Meta::ToClass'],
15             application_to_role => ['MooseX::ExtraArgs::Meta::ToRole'],
16             },
17             );
18              
19             return $self->$orig( $from_role, $to_role );
20             };
21              
22             1;