line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::VIAF::API::Parse; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
16
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
93
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
94
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
12
|
use Moo; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
33
|
|
7
|
4
|
|
|
4
|
|
931
|
use Catmandu::Sane; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
29
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
1331
|
use JSON; |
|
4
|
|
|
|
|
7429
|
|
|
4
|
|
|
|
|
25
|
|
10
|
4
|
|
|
4
|
|
1866
|
use XML::Struct qw(readXML); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has items => (is => 'ro', required => 1); |
13
|
|
|
|
|
|
|
has lang => (is => 'ro', default => 'nl-NL'); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub json { |
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
my $tree = decode_json($self->items); |
18
|
|
|
|
|
|
|
return $tree; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub xml { |
22
|
|
|
|
|
|
|
my ($self) = @_; |
23
|
|
|
|
|
|
|
my $tree = readXML($self->items, simple => 1); |
24
|
|
|
|
|
|
|
return $tree; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
__END__ |