Tanker/RequestGenerator.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 2 totaltotal 71.8% 23 / 32 CC 3 SCAR 6.5
CC
3
Cov
86%
new
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Tanker/ResponseGenerator.pm ↑ Summary Tanker/RequestGenerator/IRC.pm »
1 package Tanker::RequestGenerator;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Tanker::Request;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub new ($$)
8 1 ▶{
Subroutine new: called CC=3 SCAR=11.4
Pod undocumented
9 # standard stuff for creating a new object
10 # I'm not sure if this *should* be an object
11 # but I think it'll probably be useful in the end
12 1 my $proto = shift;
13 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
14
15 # yes, we must have a pipeline
16 1 ▶ my $pipeline = shift || die "You must pass a pipeline file to $class\n";
Condition50%1/2
shift() || die("You must pass a pipeline file to $class\n")
l!l
10
MC/DC0%0/1
shift() || die("You must pass a pipeline file to $class\n")
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
17  
18 # bless our self into a hash
19 1 my $self = {};
20 1 bless ($self, $class);
21  
22 1 $self->{pipeline} = $pipeline;
23  
24 # and give it on back
25 1 return $self;
26 }
27  
28 sub run($)
29 0 ▶{
Subroutine run: not called CC=1 SCAR=0.0
Pod undocumented
30 # do nothing
31 }
32  
33 1 1;
34 __END__
« Tanker/ResponseGenerator.pm ↑ Summary Tanker/RequestGenerator/IRC.pm »