Tanker/Plugin.pm

filter: Statementstmt 94.4% 17 / 18 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 69.7% 23 / 33 CC 3 SCAR 7.2
CC
3
Cov
83%
new
3.1
handle
2.0
BEGIN
1.0
CRAP 2.1
« Tanker.pm ↑ Summary Tanker/ResponseGenerator.pm »
1 package Tanker::Plugin;
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 || warn "No pipeline was passed to this plugin : $class\n";
Condition50%1/2
shift() || warn("No pipeline was passed to this plugin : $class\n")
l!l
10
MC/DC0%0/1
shift() || warn("No pipeline was passed to this plugin : $class\n")
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
17
18  
19 # bless our self into a hash
20 1 my $self = {};
21 1 bless ($self, $class);
22  
23 # load that with the config
24 1 $self->{pipeline} = $pipeline;
25  
26 # and give it on back
27 1 return $self;
28 }
29  
30 sub handle ($$)
31 0 ▶{
Subroutine handle: not called CC=1 SCAR=6.9
Pod undocumented
32 0 my ($self, $request) = @_;
33  
34 }
35  
36  
37  
38  
39 1 1;
40 __END__
« Tanker.pm ↑ Summary Tanker/ResponseGenerator.pm »