line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::XML::Response; |
2
|
|
|
|
|
|
|
|
3
|
33
|
|
|
33
|
|
23056651
|
use strict; |
|
33
|
|
|
|
|
50
|
|
|
33
|
|
|
|
|
730
|
|
4
|
33
|
|
|
33
|
|
161
|
use warnings; |
|
33
|
|
|
|
|
37
|
|
|
33
|
|
|
|
|
700
|
|
5
|
|
|
|
|
|
|
|
6
|
33
|
|
|
33
|
|
14611
|
use XML::TreePP; |
|
33
|
|
|
|
|
134788
|
|
|
33
|
|
|
|
|
537
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
8
|
|
|
8
|
1
|
36
|
my ($class, %params) = @_; |
10
|
|
|
|
|
|
|
|
11
|
8
|
|
|
|
|
137
|
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
|
8
|
|
|
|
|
78
|
my $content = $tpp->parse($params{content}); |
19
|
|
|
|
|
|
|
|
20
|
8
|
50
|
|
|
|
4863
|
die "content is not an XML message" unless ref $content eq 'HASH'; |
21
|
8
|
100
|
|
|
|
40
|
die "content is an invalid XML message" unless defined($content->{REPLY}); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $self = { |
24
|
|
|
|
|
|
|
content => $content->{REPLY} |
25
|
6
|
|
|
|
|
13
|
}; |
26
|
|
|
|
|
|
|
|
27
|
6
|
|
|
|
|
12
|
bless $self, $class; |
28
|
|
|
|
|
|
|
|
29
|
6
|
|
|
|
|
26
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub getContent { |
33
|
6
|
|
|
6
|
1
|
2682
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
6
|
|
|
|
|
14
|
return $self->{content}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub getOptionsInfoByName { |
39
|
4
|
|
|
4
|
1
|
31281
|
my ($self, $name) = @_; |
40
|
|
|
|
|
|
|
|
41
|
4
|
50
|
|
|
|
12
|
return unless $self->{content}->{OPTION}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
return |
44
|
6
|
|
|
|
|
23
|
grep { $_->{NAME} eq $name } |
45
|
4
|
|
|
|
|
4
|
@{$self->{content}->{OPTION}}; |
|
4
|
|
|
|
|
8
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |