Response/MapReport.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Response/IScannerList.pm ↑ Summary Response/MapReport2.pm »
1 package QualysGuard::Response::MapReport;
2  
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use base qw( QualysGuard::Response );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 our $VERSION = '0.02';
9  
10  
11  
12 # =============================================================
13 # - new
14 # =============================================================
15 sub new {
16 my ( $class, $xml ) = @_;
17  
18 my $self = __PACKAGE__->SUPER::new( $xml );
19  
20 bless $self, $class;
21  
22 # -- check for QualysGuard function error
23  
24 if ( $self->exists('/MAP/ERROR') ) {
25 $self->{error_code} = $self->findvalue('/MAP/ERROR/@number');
26 $self->{error_text} = $self->getNodeText('/MAP/ERROR');
27 $self->{error_text} =~ s/^\s+(.*)\s+$/$1/m;
28 }
29  
30 return $self;
31 }
32  
33  
34  
35 # =============================================================
36 # - get_ip_address_list
37 # =============================================================
38 sub get_ip_address_list {
39 my $self = shift;
40 my @nodes = $self->findnodes('/MAP/IP');
41 my @rv = ();
42
43 foreach my $node ( @nodes ) {
44 push( @rv, $node->getAttribute( 'value' ) );
45 }
46  
47 return \@rv;
48 }
49  
50  
51  
52 1;
53  
54 __END__
« Response/IScannerList.pm ↑ Summary Response/MapReport2.pm »