line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
6460
|
use v5.12; |
|
4
|
|
|
|
|
17
|
|
2
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
76
|
|
3
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
214
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
7
|
|
|
|
|
|
|
our $VERSION = '0.006'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use parent qw(Benchmark::Featureset::ParamCheck::Base); |
10
|
4
|
|
|
4
|
|
21
|
use Scalar::Util qw(blessed); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
18
|
|
11
|
4
|
|
|
4
|
|
205
|
use namespace::autoclean; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
154
|
|
12
|
4
|
|
|
4
|
|
30
|
|
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
23
|
|
13
|
|
|
|
|
|
|
use constant long_name => 'Naive Pure Perl Implementation'; |
14
|
4
|
|
|
4
|
|
228
|
use constant short_name => 'PurePerl'; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
195
|
|
15
|
4
|
|
|
4
|
|
23
|
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1836
|
|
16
|
|
|
|
|
|
|
state $check = sub { |
17
|
|
|
|
|
|
|
my %args = (@_==1 && ref($_[0]) eq 'HASH') ? %{$_[0]} : @_; |
18
|
|
|
|
|
|
|
die 'invalid key' if grep !/\A(integer|object|hashes)\z/, keys %args; |
19
|
400018
|
100
|
66
|
400018
|
|
1089838
|
|
|
400009
|
|
|
|
|
1045250
|
|
20
|
400018
|
100
|
|
|
|
1798758
|
die 'bad integer' unless |
21
|
|
|
|
|
|
|
defined($args{integer}) |
22
|
|
|
|
|
|
|
&& !ref($args{integer}) |
23
|
|
|
|
|
|
|
&& $args{integer} =~ /\A-?[0-9]+\z/; |
24
|
|
|
|
|
|
|
|
25
|
400016
|
100
|
66
|
|
|
1702426
|
die 'bad object' unless |
|
|
|
100
|
|
|
|
|
26
|
|
|
|
|
|
|
blessed($args{object}) |
27
|
|
|
|
|
|
|
&& $args{object}->can('print') |
28
|
|
|
|
|
|
|
&& $args{object}->can('close'); |
29
|
|
|
|
|
|
|
|
30
|
400012
|
100
|
100
|
|
|
2136334
|
die 'bad hashes' unless |
|
|
|
66
|
|
|
|
|
31
|
|
|
|
|
|
|
ref($args{hashes}) eq 'ARRAY'; |
32
|
|
|
|
|
|
|
for my $arr (@{ $args{hashes} }) { |
33
|
400008
|
100
|
|
|
|
928263
|
die 'bad hashes' unless ref($arr) eq 'HASH'; |
34
|
400006
|
|
|
|
|
541857
|
} |
|
400006
|
|
|
|
|
719085
|
|
35
|
2000026
|
100
|
|
|
|
3460840
|
|
36
|
|
|
|
|
|
|
\%args; |
37
|
|
|
|
|
|
|
}; |
38
|
400004
|
|
|
|
|
1238714
|
} |
39
|
58
|
|
|
58
|
0
|
183
|
|
40
|
|
|
|
|
|
|
state $check = sub { |
41
|
|
|
|
|
|
|
die 'wrong number of parameters' unless @_==3; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
die 'bad integer' unless |
44
|
400007
|
100
|
|
400007
|
|
673400
|
defined($_[0]) |
45
|
|
|
|
|
|
|
&& !ref($_[0]) |
46
|
400005
|
100
|
33
|
|
|
1538036
|
&& $_[0] =~ /\A-?[0-9]+\z/; |
|
|
|
66
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
die 'bad object' unless |
49
|
|
|
|
|
|
|
blessed($_[2]) |
50
|
|
|
|
|
|
|
&& $_[2]->can('print') |
51
|
400004
|
100
|
66
|
|
|
1998863
|
&& $_[2]->can('close'); |
|
|
|
66
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
die 'bad hashes' unless |
54
|
|
|
|
|
|
|
ref($_[1]) eq 'ARRAY'; |
55
|
|
|
|
|
|
|
for my $arr (@{ $_[1] }) { |
56
|
400003
|
50
|
|
|
|
836101
|
die 'bad hashes' unless ref($arr) eq 'HASH'; |
57
|
|
|
|
|
|
|
} |
58
|
400003
|
|
|
|
|
498142
|
|
|
400003
|
|
|
|
|
659844
|
|
59
|
2000013
|
100
|
|
|
|
3252634
|
@_; |
60
|
|
|
|
|
|
|
}; |
61
|
|
|
|
|
|
|
} |
62
|
400002
|
|
|
|
|
918547
|
|
63
|
47
|
|
|
47
|
0
|
111
|
1; |