line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::XML::Query; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
23213472
|
use strict; |
|
40
|
|
|
|
|
57
|
|
|
40
|
|
|
|
|
882
|
|
4
|
40
|
|
|
40
|
|
134
|
use warnings; |
|
40
|
|
|
|
|
39
|
|
|
40
|
|
|
|
|
788
|
|
5
|
|
|
|
|
|
|
|
6
|
40
|
|
|
40
|
|
4293
|
use XML::TreePP; |
|
40
|
|
|
|
|
38922
|
|
|
40
|
|
|
|
|
551
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
10
|
|
|
10
|
1
|
26766
|
my ($class, %params) = @_; |
10
|
|
|
|
|
|
|
|
11
|
10
|
100
|
|
|
|
42
|
die "no query parameter" unless $params{query}; |
12
|
|
|
|
|
|
|
|
13
|
9
|
|
|
|
|
19
|
my $self = {}; |
14
|
9
|
|
|
|
|
17
|
bless $self, $class; |
15
|
|
|
|
|
|
|
|
16
|
9
|
|
|
|
|
30
|
foreach my $key (keys %params) { |
17
|
28
|
|
|
|
|
77
|
$self->{h}->{uc($key)} = $params{$key}; |
18
|
|
|
|
|
|
|
} |
19
|
9
|
|
|
|
|
39
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub getContent { |
23
|
14
|
|
|
14
|
1
|
2633
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
|
25
|
14
|
|
|
|
|
205
|
my $tpp = XML::TreePP->new(indent => 2); |
26
|
|
|
|
|
|
|
|
27
|
14
|
|
|
|
|
162
|
return $tpp->write({ REQUEST => $self->{h} }); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |