line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::AlephX::Op::BorAuth; |
2
|
3
|
|
|
3
|
|
119426
|
use Catmandu::Sane; |
|
3
|
|
|
|
|
224556
|
|
|
3
|
|
|
|
|
23
|
|
3
|
3
|
|
|
3
|
|
747
|
use Catmandu::Util qw(:check :is); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
1330
|
|
4
|
3
|
|
|
3
|
|
25
|
use Moo; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
25
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.073"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with('Catmandu::AlephX::Response'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has z303 => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
lazy => 1, |
13
|
|
|
|
|
|
|
isa => sub{ |
14
|
|
|
|
|
|
|
check_hash_ref($_[0]); |
15
|
|
|
|
|
|
|
}, |
16
|
|
|
|
|
|
|
default => sub { |
17
|
|
|
|
|
|
|
{}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
has z304 => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
lazy => 1, |
23
|
|
|
|
|
|
|
isa => sub{ |
24
|
|
|
|
|
|
|
check_hash_ref($_[0]); |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
default => sub { |
27
|
|
|
|
|
|
|
{}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
has z305 => ( |
31
|
|
|
|
|
|
|
is => 'ro', |
32
|
|
|
|
|
|
|
lazy => 1, |
33
|
|
|
|
|
|
|
isa => sub{ |
34
|
|
|
|
|
|
|
check_hash_ref($_[0]); |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
default => sub { |
37
|
|
|
|
|
|
|
{}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
0
|
|
sub op { 'bor-auth' } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub parse { |
44
|
0
|
|
|
0
|
0
|
|
my($class,$str_ref) = @_; |
45
|
0
|
|
|
|
|
|
my $xpath = xpath($str_ref); |
46
|
0
|
|
|
|
|
|
my $op = op(); |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my @keys = qw(z303 z304 z305); |
49
|
0
|
|
|
|
|
|
my %args = (); |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
for my $key(@keys){ |
52
|
0
|
|
|
|
|
|
my($l) = $xpath->find("/$op/$key")->get_nodelist(); |
53
|
0
|
0
|
|
|
|
|
my $data = $l ? get_children($l,1) : {}; |
54
|
0
|
|
|
|
|
|
$args{$key} = $data; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__PACKAGE__->new( |
58
|
0
|
|
|
|
|
|
%args, |
59
|
|
|
|
|
|
|
session_id => $xpath->findvalue("/$op/session-id"), |
60
|
|
|
|
|
|
|
errors => $class->parse_errors($xpath), |
61
|
|
|
|
|
|
|
content_ref => $str_ref |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |