blib/lib/Test/Stream/Hub/Interceptor.pm

filter: Statementstmt 88.0% 22 / 25 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 7 / 7 Podpod 50.0% 1 / 2 totaltotal 75.5% 34 / 45 CC 4 SCAR 11.0
CC
4
Cov
79%
inherit
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Test/Stream/Compare/Pattern.pm ↑ Summary blib/lib/Test/Stream/Plugin/Capabilities.pm »
1 package Test::Stream::Hub::Interceptor;
2 42 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 42 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 42 ▶use Test::Stream::Hub::Interceptor::Terminator();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 42 ▶use base 'Test::Stream::Hub';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 42 ▶use Test::Stream::HashBase;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 139 ▶sub inherit {
Subroutine inherit: called CC=4 SCAR=17.9
Pod documented
11 139 my $self = shift;
12 139 my ($from, %params) = @_;
13  
14 139 ▶ if ($from->{+IPC} && !$self->{+IPC} && !exists($params{ipc})) {
Branch: 1 branch
BranchTrueFalseTotal
if ($from->{"ipc"} and not $self->{"ipc"} and not exists $params{"ipc"}) 0 139 139
Condition50%3/6
$from->{"ipc"} and not $self->{"ipc"} and not exists $params{"ipc"}
!ll&&!rl&&r
13900
$from->{"ipc"} and not $self->{"ipc"}
!ll&&!rl&&r
61330
MC/DC0%0/3
$from->{"ipc"} and not $self->{"ipc"} and not exists $params{"ipc"}
$from->{"ipc"} not $self->{"ipc"} not exists $params{"ipc"}
Truth table50%2/4
A and not(B) and not(C)
A= $from->{"ipc"}B= not $self->{"ipc"}C= not exists $params{"ipc"}
ABCresult
0XX0
10X0
1100
1111
15 0 my $ipc = $from->{+IPC};
16 0 $self->{+IPC} = $ipc;
17 0 $ipc->add_hub($self->{+HID});
18 }
19 }
20  
21 19 ▶sub terminate {
Subroutine terminate: called CC=1 SCAR=0.0
Pod undocumented
22 19 my $self = shift;
23 19 my ($code) = @_;
24 19 die bless(\$code, 'Test::Stream::Hub::Interceptor::Terminator');
25 }
26  
27 42 1;
28  
29 __END__
« blib/lib/Test/Stream/Compare/Pattern.pm ↑ Summary blib/lib/Test/Stream/Plugin/Capabilities.pm »