line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MouseX::POE::Role; |
2
|
|
|
|
|
|
|
$MouseX::POE::Role::VERSION = '0.216'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Eventful roles |
4
|
2
|
|
|
2
|
|
68793
|
use MouseX::POE::Meta::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
60
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
15
|
use Mouse::Exporter; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
9
|
|
7
|
2
|
|
|
2
|
|
822
|
use Mouse::Util::MetaRole; |
|
2
|
|
|
|
|
1336
|
|
|
2
|
|
|
|
|
54
|
|
8
|
2
|
|
|
2
|
|
12
|
use Mouse::Role; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Mouse::Exporter->setup_import_methods( |
11
|
|
|
|
|
|
|
as_is => [qw(event)], |
12
|
|
|
|
|
|
|
also => 'Mouse::Role', |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub init_meta { |
16
|
2
|
|
|
2
|
0
|
39
|
my ( $class, %args ) = @_; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
2
|
my $for = $args{for_class}; |
19
|
2
|
|
|
2
|
|
936
|
eval qq{package $for; use POE; }; |
|
2
|
|
|
|
|
63618
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
111
|
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
111778
|
my $meta = Mouse->init_meta( %args ); |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
419
|
Mouse::Util::MetaRole::apply_metaroles( |
24
|
|
|
|
|
|
|
for => $args{for_class}, |
25
|
|
|
|
|
|
|
role_metaroles => { |
26
|
|
|
|
|
|
|
role => ['MouseX::POE::Meta::Role','MouseX::POE::Meta::Trait'], |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
63
|
Mouse::Util::MetaRole::apply_base_class_roles( |
31
|
|
|
|
|
|
|
for_class => $args{for_class}, |
32
|
|
|
|
|
|
|
roles => ['MouseX::POE::Meta::Trait::Object','MouseX::POE::Meta::Trait','MouseX::POE::Meta::Trait::Class'], |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
25717
|
return $meta; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub event { |
39
|
0
|
|
|
0
|
1
|
|
my $class = Mouse::Meta::Class->initialize( scalar caller ); |
40
|
0
|
|
|
|
|
|
$class->add_state_method( @_ ); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |