File Coverage

blib/lib/Sslscan/Parser/Session.pm
Criterion Covered Total %
statement 4 6 66.6
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 6 8 75.0


line stmt bran cond sub pod time code
1             # $Id: Session.pm 134 2009-10-16 18:21:38Z jabra $
2             package Sslscan::Parser::Session;
3             {
4             our $VERSION = '0.01';
5             $VERSION = eval $VERSION;
6              
7 2     2   12 use Object::InsideOut;
  2         4  
  2         13  
8 2     2   1875 use XML::LibXML;
  0            
  0            
9             use Sslscan::Parser::ScanDetails;
10              
11             my @title : Field : Arg(title) : All(title);
12             my @web : Field : Arg(web) : All(web);
13             my @version : Field : Arg(version) : All(version);
14             my @scandetails : Field : Arg(scandetails) : Get(scandetails) :
15             Type(Sslscan::Parser::ScanDetails);
16              
17             sub parse {
18             my ( $self, $parser, $doc ) = @_;
19              
20             foreach my $Sslscanscan ( $doc->getElementsByTagName('document') ) {
21             return Sslscan::Parser::Session->new(
22             title => $Sslscanscan->getAttribute('title'),
23             version => $Sslscanscan->getAttribute('version'),
24             web => $Sslscanscan->getAttribute('web'),
25             scandetails =>
26             Sslscan::Parser::ScanDetails->parse( $parser, $doc ),
27             );
28             }
29             }
30             }
31             1;