line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Compiled::Params::OO; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
219698
|
use 5.006; |
|
3
|
|
|
|
|
29
|
|
4
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
93
|
|
5
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
204
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1975
|
use Type::Params qw/compile_named_oo compile/; |
|
3
|
|
|
|
|
356415
|
|
|
3
|
|
|
|
|
40
|
|
10
|
3
|
|
|
3
|
|
1402
|
use Types::Standard qw/CodeRef/; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
30
|
|
11
|
3
|
|
|
3
|
|
2425
|
use base 'Import::Export'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
1684
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our %EX = ( |
14
|
|
|
|
|
|
|
cpo => [qw/all/] |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub cpo { |
18
|
2
|
|
|
2
|
1
|
31797
|
my (%params, %compile, %build) = @_; |
19
|
2
|
|
|
|
|
10
|
for my $key (keys %params) { |
20
|
4
|
|
|
|
|
13522
|
$compile{$key} = CodeRef; |
21
|
|
|
|
|
|
|
$build{$key} = ref $params{$key} eq 'HASH' |
22
|
|
|
|
|
|
|
? compile_named_oo( map { ref $params{$key}{$_} eq 'HASH' |
23
|
|
|
|
|
|
|
? ($_ => delete $params{$key}{$_}{type} => $params{$key}{$_}) |
24
|
8
|
100
|
|
|
|
38
|
: ($_ => $params{$key}{$_}) |
25
|
2
|
|
|
|
|
8
|
} keys %{$params{$key}}) |
26
|
4
|
100
|
|
|
|
32
|
: compile(@{$params{$key}}); |
|
2
|
|
|
|
|
11
|
|
27
|
|
|
|
|
|
|
} |
28
|
2
|
|
|
|
|
1869
|
return compile_named_oo(%compile)->(%build); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |