line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::XML::Response; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
18253834
|
use strict; |
|
21
|
|
|
|
|
91
|
|
|
21
|
|
|
|
|
786
|
|
4
|
21
|
|
|
21
|
|
105
|
use warnings; |
|
21
|
|
|
|
|
38
|
|
|
21
|
|
|
|
|
694
|
|
5
|
|
|
|
|
|
|
|
6
|
21
|
|
|
21
|
|
11791
|
use XML::TreePP; |
|
21
|
|
|
|
|
124903
|
|
|
21
|
|
|
|
|
267
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
5
|
|
|
5
|
1
|
13
|
my ($class, %params) = @_; |
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
57
|
my $tpp = XML::TreePP->new( |
12
|
|
|
|
|
|
|
force_array => [ qw/ |
13
|
|
|
|
|
|
|
OPTION PARAM MODEL AUTHENTICATION RANGEIP DEVICE GET WALK |
14
|
|
|
|
|
|
|
/ ], |
15
|
|
|
|
|
|
|
attr_prefix => '', |
16
|
|
|
|
|
|
|
text_node_key => 'content' |
17
|
|
|
|
|
|
|
); |
18
|
5
|
|
|
|
|
81
|
my $content = $tpp->parse($params{content}); |
19
|
|
|
|
|
|
|
|
20
|
5
|
50
|
|
|
|
2589
|
die "content is not an XML message" unless ref $content eq 'HASH'; |
21
|
5
|
100
|
|
|
|
40
|
die "content is an invalid XML message" unless defined($content->{REPLY}); |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
8
|
my $self = { |
24
|
|
|
|
|
|
|
content => $content->{REPLY} |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
15
|
bless $self, $class; |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
|
|
19
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub getContent { |
33
|
3
|
|
|
3
|
1
|
4073
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
3
|
|
|
|
|
15
|
return $self->{content}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub getOptionsInfoByName { |
39
|
0
|
|
|
0
|
1
|
|
my ($self, $name) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
return unless $self->{content}->{OPTION}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
return |
44
|
0
|
|
|
|
|
|
grep { $_->{NAME} eq $name } |
|
0
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
@{$self->{content}->{OPTION}}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |