line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::XML::Query; |
2
|
|
|
|
|
|
|
|
3
|
24
|
|
|
24
|
|
18431248
|
use strict; |
|
24
|
|
|
|
|
36
|
|
|
24
|
|
|
|
|
810
|
|
4
|
24
|
|
|
24
|
|
110
|
use warnings; |
|
24
|
|
|
|
|
27
|
|
|
24
|
|
|
|
|
565
|
|
5
|
|
|
|
|
|
|
|
6
|
24
|
|
|
24
|
|
3972
|
use XML::TreePP; |
|
24
|
|
|
|
|
49949
|
|
|
24
|
|
|
|
|
213
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
1
|
|
|
1
|
1
|
14
|
my ($class, %params) = @_; |
10
|
|
|
|
|
|
|
|
11
|
1
|
50
|
|
|
|
5
|
die "no query parameter" unless $params{query}; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
2
|
my $self = {}; |
14
|
1
|
|
|
|
|
2
|
bless $self, $class; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
4
|
foreach my $key (keys %params) { |
17
|
3
|
|
|
|
|
9
|
$self->{h}->{uc($key)} = $params{$key}; |
18
|
|
|
|
|
|
|
} |
19
|
1
|
|
|
|
|
2
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub getContent { |
23
|
7
|
|
|
7
|
1
|
14
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
|
25
|
7
|
|
|
|
|
77
|
my $tpp = XML::TreePP->new(indent => 2); |
26
|
|
|
|
|
|
|
|
27
|
7
|
|
|
|
|
146
|
return $tpp->write({ REQUEST => $self->{h} }); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |