line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::HasA; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5586
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
34
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
138
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
|
|
1
|
|
7
|
my ($self, @args) = @_; |
12
|
1
|
50
|
|
|
|
5
|
croak "Wrong number of arguments to import" if @args & 1; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
4
|
while (my ($method, $how) = splice(@args, 0,2)) { |
15
|
2
|
|
|
|
|
4
|
my @methods = $method; |
16
|
2
|
100
|
|
|
|
6
|
@methods = @$method if ref $method eq "ARRAY"; |
17
|
2
|
|
|
|
|
3
|
for $method (@methods) { |
18
|
1
|
|
|
1
|
|
4
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
87
|
|
19
|
3
|
|
|
2
|
|
8
|
*{caller()."::$method"} = sub { (shift->$how)->$method(@_) }; |
|
3
|
|
|
|
|
1451
|
|
|
2
|
|
|
|
|
140
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Preloaded methods go here. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |