blib/lib/Egg/View/Mail/Plugin/PortCheck.pm

filter: Statementstmt 42.3% 11 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 60.0% 3 / 5 Podpod 100% 1 / 1 totaltotal 30.0% 15 / 50 CC 7 SCAR 28.4
CC
7
Cov
28%
_setup
30.0
send
12.0
BEGIN
1.0
CRAP 17.2
« blib/lib/Egg/View/Mail/Plugin/Signature.pm ↑ Summary blib/lib/Egg/View/Mail/Plugin/Jfold.pm »
1 package Egg::View::Mail::Plugin::PortCheck;
2 #
3 # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
4 #
5 # $Id: PortCheck.pm 285 2008-02-28 04:20:55Z lushe $
6 #
7 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Carp qw/ croak /;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $VERSION = '0.01';
12  
13 0 ▶sub _setup {
Subroutine _setup: not called CC=5 SCAR=34.0
14 0 my($class, $e)= @_;
15 0 ▶ $e->isa('Egg::Plugin::Net::Scan')
Branch: 1 branch
BranchTrueFalseTotal
$e->isa("Egg::Plugin::Net::Scan") or die "I want setup 'Egg::Plugin::Net::Scan'." 0 0 0
16 || die q{I want setup 'Egg::Plugin::Net::Scan'.};
17 0 my $c= $class->config;
18 0 ▶ $c->{scan_host} ||= 'localhost';
Condition0%0/2
$c->{"scan_host"} ||= "localhost"
l!l
00
MC/DC0%0/1
$c->{"scan_host"} ||= "localhost"
$c->{"scan_host"}
Truth table0%0/2
A
A= $c->{"scan_host"}
Aresult
11
00
19 0 ▶ $c->{scan_port} ||= 25;
Condition0%0/2
$c->{"scan_port"} ||= 25
l!l
00
MC/DC0%0/1
$c->{"scan_port"} ||= 25
$c->{"scan_port"}
Truth table0%0/2
A
A= $c->{"scan_port"}
Aresult
11
00
20 0 ▶ $c->{scan_timeout} ||= 3;
Condition0%0/2
$c->{"scan_timeout"} ||= 3
l!l
00
MC/DC0%0/1
$c->{"scan_timeout"} ||= 3
$c->{"scan_timeout"}
Truth table0%0/2
A
A= $c->{"scan_timeout"}
Aresult
11
00
21 0 $class->mk_accessors('scan');
22 0 $class->next::method($e);
23 }
24 0 ▶sub send {
Subroutine send: not called CC=3 SCAR=24.8
Pod documented
25 0 my $self= shift;
26 0 my $c = $self->config;
27 0 ▶ my $res = $self->scan || do {
Condition0%0/3
$self->scan || do { my $scan = $self->e->port_scan(@{$c;}{'scan_host', 'scan_port'}, 'timeout', $c->{'scan_timeout'}); $self->scan($scan) }
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->scan || do { my $scan = $self->e->port_scan(@{$c;}{'scan_host', 'scan_port'}, 'timeout', $c->{'scan_timeout'}); $self->scan($scan) }
$self->scan do { my $scan = $self->e->port_scan(@{$c;}{'scan_host', 'scan_port'}, 'timeout', $c->{'scan_timeout'}); $self->scan($scan) }
Truth table0%0/3
A || B
A= $self->scanB= do { my $scan = $self->e->port_scan(@{$c;}{'scan_host', 'scan_port'}, 'timeout', $c->{'scan_timeout'}); $self->scan($scan) }
ABresult
1X1
011
000
28 my $scan= $self->e->port_scan
29 0 (@{$c}{qw/ scan_host scan_port /}, timeout=> $c->{scan_timeout} );
30 0 $self->scan($scan);
31 };
32 0 ▶ $res->is_success ? $self->next::method(@_): 0;
Branch: 1 branch
BranchTrueFalseTotal
$res->is_success ? : 0 0 0
33 }
34  
35 2 1;
36  
37 __END__
« blib/lib/Egg/View/Mail/Plugin/Signature.pm ↑ Summary blib/lib/Egg/View/Mail/Plugin/Jfold.pm »