line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::ExtraArgs::Meta::ToRole; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$MooseX::ExtraArgs::Meta::ToRole::VERSION = '0.02'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
11303
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
around apply => sub{ |
8
|
|
|
|
|
|
|
my $orig = shift; |
9
|
|
|
|
|
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
my $from_role = shift; |
11
|
|
|
|
|
|
|
my $to_role = shift; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
$to_role = Moose::Util::MetaRole::apply_metaroles( |
14
|
|
|
|
|
|
|
for => $to_role, |
15
|
|
|
|
|
|
|
role_metaroles => { |
16
|
|
|
|
|
|
|
application_to_class => ['MooseX::ExtraArgs::Meta::ToClass'], |
17
|
|
|
|
|
|
|
application_to_role => ['MooseX::ExtraArgs::Meta::ToRole'], |
18
|
|
|
|
|
|
|
}, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
return $self->$orig( $from_role, $to_role ); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |