| 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
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 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")
MC/DC0%0/1
shift() || die("You must pass a pipeline file to $class\n")
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||