line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::AlephX::Op::ItemDataMulti; |
2
|
1
|
|
|
1
|
|
104048
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
192695
|
|
|
1
|
|
|
|
|
8
|
|
3
|
1
|
|
|
1
|
|
306
|
use Catmandu::Util qw(:check :is); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
420
|
|
4
|
1
|
|
|
1
|
|
8
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.073"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with('Catmandu::AlephX::Response'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has items => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
lazy => 1, |
13
|
|
|
|
|
|
|
isa => sub{ |
14
|
|
|
|
|
|
|
check_array_ref($_[0]); |
15
|
|
|
|
|
|
|
for(@{ $_[0] }){ |
16
|
|
|
|
|
|
|
check_hash_ref($_); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
}, |
19
|
|
|
|
|
|
|
default => sub { |
20
|
|
|
|
|
|
|
[]; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
has start_point => (is => 'ro'); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
sub op { 'item-data-multi' } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub parse { |
28
|
0
|
|
|
0
|
0
|
|
my($class,$str_ref) = @_; |
29
|
0
|
|
|
|
|
|
my $xpath = xpath($str_ref); |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
my $op = op(); |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my @items; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
for my $item($xpath->find("/$op/item")->get_nodelist()){ |
36
|
0
|
|
|
|
|
|
push @items,get_children($item,1); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__PACKAGE__->new( |
40
|
0
|
|
|
|
|
|
session_id => $xpath->findvalue("/$op/session-id"), |
41
|
|
|
|
|
|
|
errors => $class->parse_errors($xpath), |
42
|
|
|
|
|
|
|
items => \@items, |
43
|
|
|
|
|
|
|
start_point => $xpath->findvalue("/$op/start-point"), |
44
|
|
|
|
|
|
|
content_ref => $str_ref |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |