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