line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::SingleArg::Meta::ToClass; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$MooseX::SingleArg::Meta::ToClass::VERSION = '0.09'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4086
|
use Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
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
|
|
|
|
|
|
|
$to_class = Moose::Util::MetaRole::apply_metaroles( |
14
|
|
|
|
|
|
|
for => $to_class, |
15
|
|
|
|
|
|
|
class_metaroles => { |
16
|
|
|
|
|
|
|
class => ['MooseX::SingleArg::Meta::Class'], |
17
|
|
|
|
|
|
|
}, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Moose::Util::MetaRole::apply_base_class_roles( |
21
|
|
|
|
|
|
|
for => $to_class, |
22
|
|
|
|
|
|
|
roles => ['MooseX::SingleArg::Meta::Object'], |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$to_class->single_arg( $from_role->single_arg() ) if $from_role->has_single_arg(); |
26
|
|
|
|
|
|
|
$to_class->force_single_arg( $from_role->force_single_arg() ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return $self->$orig( $from_role, $to_class ); |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |