line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::AlephX::Op::HoldReqCancel; |
2
|
1
|
|
|
1
|
|
101785
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
193317
|
|
|
1
|
|
|
|
|
9
|
|
3
|
1
|
|
|
1
|
|
356
|
use Catmandu::Util qw(:check :is); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
490
|
|
4
|
1
|
|
|
1
|
|
9
|
use Moo; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.072"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with('Catmandu::AlephX::Response'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has reply => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
required => 1, |
13
|
|
|
|
|
|
|
isa => sub{ |
14
|
|
|
|
|
|
|
check_string($_[0]); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
0
|
|
sub op { 'hold-req-cancel' } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub parse { |
21
|
0
|
|
|
0
|
0
|
|
my($class,$str_ref) = @_; |
22
|
0
|
|
|
|
|
|
my $xpath = xpath($str_ref); |
23
|
0
|
|
|
|
|
|
my $op = op(); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my %args; |
26
|
0
|
|
|
|
|
|
for(qw(session-id reply)){ |
27
|
0
|
|
|
|
|
|
my $key = $_; |
28
|
0
|
|
|
|
|
|
$key =~ s/-/_/go; |
29
|
0
|
|
|
|
|
|
$args{$key} = $xpath->findvalue("/$op/$_"); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$args{errors} = $class->parse_errors($xpath); |
33
|
0
|
|
|
|
|
|
$args{content_ref} = $str_ref; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
__PACKAGE__->new(%args); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |