line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
27
|
|
|
27
|
|
175
|
|
|
27
|
|
|
|
|
48
|
|
|
27
|
|
|
|
|
210
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Catmandu::Util qw(is_instance require_package); |
7
|
27
|
|
|
27
|
|
311
|
use String::CamelCase qw(camelize); |
|
27
|
|
|
|
|
54
|
|
|
27
|
|
|
|
|
1573
|
|
8
|
27
|
|
|
27
|
|
10179
|
use Moo; |
|
27
|
|
|
|
|
12478
|
|
|
27
|
|
|
|
|
1468
|
|
9
|
27
|
|
|
27
|
|
193
|
use namespace::clean; |
|
27
|
|
|
|
|
56
|
|
|
27
|
|
|
|
|
166
|
|
10
|
27
|
|
|
27
|
|
9192
|
|
|
27
|
|
|
|
|
73
|
|
|
27
|
|
|
|
|
175
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Fix::Namespace'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self, $name, $args, $type) = @_; |
14
|
|
|
|
|
|
|
my $ns = join('::', map {camelize($_)} split(/\./, $self->name)); |
15
|
429
|
|
|
429
|
0
|
1103
|
$ns = join('::', $ns, $type) if $type; |
16
|
429
|
|
|
|
|
1799
|
|
|
858
|
|
|
|
|
6719
|
|
17
|
429
|
100
|
|
|
|
4057
|
my $pkg; |
18
|
|
|
|
|
|
|
try { |
19
|
429
|
|
|
|
|
610
|
$pkg = require_package($name, $ns); |
20
|
|
|
|
|
|
|
} |
21
|
429
|
|
|
429
|
|
37602
|
catch_case [ |
22
|
|
|
|
|
|
|
'Catmandu::NoSuchPackage' => sub { |
23
|
|
|
|
|
|
|
Catmandu::NoSuchFixPackage->throw( |
24
|
|
|
|
|
|
|
message => "No such fix package: $name", |
25
|
3
|
|
|
3
|
|
1243
|
package_name => $_->package_name, |
26
|
|
|
|
|
|
|
fix_name => $name, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
]; |
30
|
|
|
|
|
|
|
try { |
31
|
429
|
|
|
|
|
3106
|
$pkg->new(@$args); |
32
|
|
|
|
|
|
|
} |
33
|
426
|
|
|
426
|
|
32258
|
catch { |
34
|
|
|
|
|
|
|
$_->throw if is_instance($_, 'Catmandu::Error'); |
35
|
|
|
|
|
|
|
Catmandu::BadFixArg->throw( |
36
|
2
|
50
|
|
2
|
|
684
|
message => $_, |
37
|
2
|
|
|
|
|
51
|
package_name => $pkg, |
38
|
|
|
|
|
|
|
fix_name => $name, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
} |
42
|
426
|
|
|
|
|
11249
|
|
43
|
|
|
|
|
|
|
1; |