line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Acotie; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
879
|
use Class::Inspector; |
|
1
|
|
|
|
|
4042
|
|
|
1
|
|
|
|
|
33
|
|
8
|
1
|
|
|
1
|
|
10
|
use List::Util 'shuffle'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
229
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
|
|
1
|
|
2
|
my $class = shift; |
12
|
1
|
|
|
|
|
3
|
my $pkg = caller; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
5
|
my @functions = @{ Class::Inspector->functions($pkg) }; |
|
1
|
|
|
|
|
5
|
|
15
|
1
|
|
|
|
|
946
|
my @function_refs = @{ Class::Inspector->function_refs($pkg) }; |
|
1
|
|
|
|
|
9
|
|
16
|
1
|
|
|
|
|
698
|
my $num = scalar(@functions) - 1; |
17
|
1
|
|
|
|
|
73
|
my @idx = shuffle 0..$num; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
2
|
my $i = 0; |
20
|
1
|
|
|
|
|
2
|
for my $func (@functions) { |
21
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
35
|
|
|
1
|
|
|
|
|
23
|
|
22
|
1
|
|
|
1
|
|
5
|
no warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
90
|
|
23
|
21
|
|
|
|
|
20
|
*{"$pkg\::$func"} = $function_refs[$idx[$i++]]; |
|
21
|
|
|
|
|
80
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |