line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
27
|
|
|
27
|
|
182
|
|
|
27
|
|
|
|
|
52
|
|
|
27
|
|
|
|
|
212
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Catmandu::Util qw(is_instance require_package); |
7
|
27
|
|
|
27
|
|
295
|
use String::CamelCase qw(camelize); |
|
27
|
|
|
|
|
91
|
|
|
27
|
|
|
|
|
1603
|
|
8
|
27
|
|
|
27
|
|
10328
|
use Moo; |
|
27
|
|
|
|
|
12567
|
|
|
27
|
|
|
|
|
1438
|
|
9
|
27
|
|
|
27
|
|
186
|
use namespace::clean; |
|
27
|
|
|
|
|
47
|
|
|
27
|
|
|
|
|
185
|
|
10
|
27
|
|
|
27
|
|
9355
|
|
|
27
|
|
|
|
|
50
|
|
|
27
|
|
|
|
|
196
|
|
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
|
1056
|
$ns = join('::', $ns, $type) if $type; |
16
|
429
|
|
|
|
|
1544
|
|
|
858
|
|
|
|
|
5910
|
|
17
|
429
|
100
|
|
|
|
3942
|
my $pkg; |
18
|
|
|
|
|
|
|
try { |
19
|
429
|
|
|
|
|
564
|
$pkg = require_package($name, $ns); |
20
|
|
|
|
|
|
|
} |
21
|
429
|
|
|
429
|
|
35760
|
catch_case [ |
22
|
|
|
|
|
|
|
'Catmandu::NoSuchPackage' => sub { |
23
|
|
|
|
|
|
|
Catmandu::NoSuchFixPackage->throw( |
24
|
|
|
|
|
|
|
message => "No such fix package: $name", |
25
|
3
|
|
|
3
|
|
1066
|
package_name => $_->package_name, |
26
|
|
|
|
|
|
|
fix_name => $name, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
]; |
30
|
|
|
|
|
|
|
try { |
31
|
429
|
|
|
|
|
2826
|
$pkg->new(@$args); |
32
|
|
|
|
|
|
|
} |
33
|
426
|
|
|
426
|
|
31496
|
catch { |
34
|
|
|
|
|
|
|
$_->throw if is_instance($_, 'Catmandu::Error'); |
35
|
|
|
|
|
|
|
Catmandu::BadFixArg->throw( |
36
|
2
|
50
|
|
2
|
|
631
|
message => $_, |
37
|
2
|
|
|
|
|
46
|
package_name => $pkg, |
38
|
|
|
|
|
|
|
fix_name => $name, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
} |
42
|
426
|
|
|
|
|
10217
|
|
43
|
|
|
|
|
|
|
1; |