Parser/Host.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 2 totaltotal 47.8% 11 / 23 CC 1 SCAR 5.1
CC
1
Cov
56%
get_port
2.0
get_all_ports
2.0
BEGIN
1.0
CRAP 1.7
« Parser/Session.pm ↑ Summary Parser/Host/Port.pm »
1 # $Id: Host.pm 142 2009-10-16 19:13:45Z jabra $
2 package Nikto::Parser::Host;
3 {
4 1 our $VERSION = '0.01';
5 1 $VERSION = eval $VERSION;
6  
7 1 ▶ use Object::InsideOut;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 my @ip : Field : Arg(ip) : Get(ip);
10 1 my @hostname : Field : Arg(hostname) : Get(hostname);
11 1 my @ports : Field : All(ports) : Type(List(Nikto::Parser::Host::Port));
12  
13 # returns the port obj based on port number
14 0 ▶ sub get_port {
Subroutine get_port: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my ( $self, $port ) = @_;
16 0 my @ports = grep( $_->port eq $port, @{ $self->ports } );
17 0 return $ports[0];
18 }
19  
20 # returns a ArrayRef containing a list of port objs
21 0 ▶ sub get_all_ports {
Subroutine get_all_ports: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my ($self) = @_;
23 0 my @ports = @{ $self->ports };
24 0 return @ports;
25 }
26 }
27 1 1;
« Parser/Session.pm ↑ Summary Parser/Host/Port.pm »