line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::ActsLike; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
635
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use Scalar::Util; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
57
|
|
6
|
1
|
|
|
1
|
|
887
|
use Class::Roles (); |
|
1
|
|
|
|
|
1056
|
|
|
1
|
|
|
|
|
23
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
9
|
|
|
|
|
|
|
$VERSION = '1.00'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
93
|
*UNIVERSAL::acts_like = \&UNIVERSAL::does; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub import |
17
|
|
|
|
|
|
|
{ |
18
|
2
|
|
|
2
|
|
1156
|
my ($self, @acts_like) = @_; |
19
|
2
|
|
|
|
|
8
|
my $caller = caller(); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
11
|
for my $role (@acts_like) |
22
|
|
|
|
|
|
|
{ |
23
|
2
|
|
|
|
|
43
|
Class::Roles->import( apply => { to => $caller, role => $role } ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
__END__ |