line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::AlephX::Op::CircStatM; |
2
|
1
|
|
|
1
|
|
105510
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
190641
|
|
|
1
|
|
|
|
|
7
|
|
3
|
1
|
|
|
1
|
|
294
|
use Catmandu::Util qw(:check); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
247
|
|
4
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.073"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with('Catmandu::AlephX::Response'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#difference from CircStatus: former cannot fetch documents with than 1000 items |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has item_data => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => sub { check_array_ref($_[0]); } |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
#only appears in the xml output when over 990 items are present |
17
|
|
|
|
|
|
|
has start_point => ( |
18
|
|
|
|
|
|
|
is => 'ro' |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
0
|
|
sub op { 'circ-stat-m' } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub parse { |
24
|
0
|
|
|
0
|
0
|
|
my($class,$str_ref) = @_; |
25
|
0
|
|
|
|
|
|
my $xpath = xpath($str_ref); |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my $op = op(); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my @item_data; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
for my $i($xpath->find("/$op/item-data")->get_nodelist()){ |
32
|
0
|
|
|
|
|
|
push @item_data,get_children($i,1); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->new( |
36
|
0
|
|
|
|
|
|
start_point => $xpath->findvalue("/$op/start-point"), |
37
|
|
|
|
|
|
|
item_data => \@item_data, |
38
|
|
|
|
|
|
|
session_id => $xpath->findvalue("/$op/session-id"), |
39
|
|
|
|
|
|
|
errors => $class->parse_errors($xpath), |
40
|
|
|
|
|
|
|
content_ref => $str_ref |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |