line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::AlephX::Op::HoldReq; |
2
|
1
|
|
|
1
|
|
109859
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
194376
|
|
|
1
|
|
|
|
|
7
|
|
3
|
1
|
|
|
1
|
|
280
|
use Catmandu::Util qw(:check :is); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
381
|
|
4
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.073"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with('Catmandu::AlephX::Response'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has reply => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
required => 1, |
13
|
|
|
|
|
|
|
isa => sub{ |
14
|
|
|
|
|
|
|
check_maybe_string($_[0]); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
0
|
|
sub op { 'hold-req' } |
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
|
0
|
0
|
|
|
|
|
$args{$key} = is_string($args{$key}) ? $args{$key} : undef; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
$args{errors} = $class->parse_errors($xpath); |
34
|
0
|
|
|
|
|
|
$args{content_ref} = $str_ref; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
__PACKAGE__->new(%args); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |