| 1 | package Tanker::Request; | ||||||||||||||||||||
| 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 | |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | sub new ($$) | ||||||||||||||||||||
| 8 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
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 | 0 | my $proto = shift; | |||||||||||||||||||
| 13 | 0 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | # yes, we must have a variable hash | ||||||||||||||||||||
| 16 | 0 | ▶ | my $self = shift || warn "No variable hash was passed to this Request\n"; | ||||||||||||||||||
|
Condition0%0/2
shift() || warn("No variable hash was passed to this Request\n")
MC/DC0%0/1
shift() || warn("No variable hash was passed to this Request\n")
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | # bless our self into a hash | ||||||||||||||||||||
| 19 | 0 | bless ($self, $class); | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | # and give it on back | ||||||||||||||||||||
| 22 | 0 | return $self; | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | sub get_data ($) | ||||||||||||||||||||
| 26 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
get_data: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 27 | 0 | my ($self) = @_; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | return $self->{data}; | |||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | 1; | |||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||