QualysGuard::Response::MapReport - QualysGuard::Response::MapReport documentation


QualysGuard-Request documentation Contained in the QualysGuard-Request distribution.

Index


Code Index:

NAME

Top

QualysGuard::Response::MapReport

VERSION

Top

Version 0.02

SYNOPSIS

Top

see QualysGuard::Request for more information.

DESCRIPTION

Top

This module is a subclass of QualysGuard::Response and XML::XPath.

see QualysGuard API documentation for more information.

PUBLIC INTERFACE

Top

get_ip_address_list

Returns an arrayref of the @value attribute for each /MAP/IP node.

see QualysGuard API documentation for more information.

AUTHOR

Top

Patrick Devlin, <pdevlin at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-qualysguard-response-assetdatareport at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=QualysGuard::Request. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc QualysGuard::Request




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=QualysGuard::Request

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/QualysGuard::Request

* CPAN Ratings

http://cpanratings.perl.org/d/QualysGuard::Request

* Search CPAN

http://search.cpan.org/dist/QualysGuard::Request

SEE ALSO

Top

QualysGuard::Request

COPYRIGHT & LICENSE

Top


QualysGuard-Request documentation Contained in the QualysGuard-Request distribution.

package QualysGuard::Response::MapReport;

use warnings;
use strict;

use base qw( QualysGuard::Response );

our $VERSION = '0.02';



# =============================================================
# - new
# =============================================================
sub new {
    my ( $class, $xml ) = @_; 

    my $self = __PACKAGE__->SUPER::new( $xml );

    bless $self, $class;

    # -- check for QualysGuard function error

    if ( $self->exists('/MAP/ERROR') ) { 
        $self->{error_code} = $self->findvalue('/MAP/ERROR/@number');
        $self->{error_text} = $self->getNodeText('/MAP/ERROR');
        $self->{error_text} =~ s/^\s+(.*)\s+$/$1/m;
    }   

    return $self;
}



# =============================================================
# - get_ip_address_list
# =============================================================
sub get_ip_address_list {
    my $self    = shift;
    my @nodes   = $self->findnodes('/MAP/IP');
    my @rv      = (); 
    
    foreach my $node ( @nodes ) { 
        push( @rv, $node->getAttribute( 'value' ) );
    }   

    return \@rv;
}



1;

__END__