line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package exact::role; |
2
|
|
|
|
|
|
|
# ABSTRACT: Simple role interface extension for exact |
3
|
|
|
|
|
|
|
|
4
|
5
|
|
|
5
|
|
561259
|
use 5.014; |
|
5
|
|
|
|
|
36
|
|
5
|
5
|
|
|
5
|
|
30
|
use exact; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
40
|
|
6
|
5
|
|
|
5
|
|
3612
|
use Import::Into; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
122
|
|
7
|
5
|
|
|
5
|
|
25
|
use feature (); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
119
|
|
8
|
5
|
|
|
5
|
|
1184
|
use Role::Tiny (); |
|
5
|
|
|
|
|
8903
|
|
|
5
|
|
|
|
|
1845
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.19'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my ($perl_version) = $^V =~ /^v5\.(\d+)/; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub import { |
15
|
9
|
|
|
9
|
|
4080
|
my ( $self, $params, $caller ) = @_; |
16
|
9
|
|
66
|
|
|
42
|
$caller //= caller(); |
17
|
|
|
|
|
|
|
|
18
|
9
|
|
|
|
|
80
|
Role::Tiny->import::into($caller); |
19
|
9
|
|
|
|
|
2921
|
exact->import::into( $caller, 'class', 'noautoclean' ); |
20
|
9
|
50
|
|
|
|
1169
|
feature->unimport('class') if ( $perl_version > 36 ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub does_role { |
24
|
2
|
|
|
2
|
1
|
575
|
Role::Tiny::does_role(@_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub apply_roles_to_package { |
28
|
1
|
|
|
1
|
1
|
1655
|
shift; |
29
|
1
|
|
|
|
|
6
|
Role::Tiny->apply_roles_to_package(@_); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub apply_roles_to_object { |
33
|
1
|
|
|
1
|
1
|
1319
|
shift; |
34
|
1
|
|
|
|
|
6
|
Role::Tiny->apply_roles_to_object(@_); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub create_class_with_roles { |
38
|
1
|
|
|
1
|
1
|
1850
|
shift; |
39
|
1
|
|
|
|
|
5
|
Role::Tiny->create_class_with_roles(@_); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub is_role { |
43
|
3
|
|
|
3
|
1
|
2052
|
shift; |
44
|
3
|
|
|
|
|
11
|
Role::Tiny->is_role(@_); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |