MCP/Control.pm

filter: Statementstmt 100% 31 / 31 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 97.6% 42 / 43 CC 4 SCAR 8.5
CC
4
Cov
97%
__ANON__
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« MCP/Scheduler/Host.pm ↑ Summary MCP/Plugin.pm »
1 package Tapper::MCP::Control;
2 27 our $AUTHORITY = 'cpan:TAPPER';
3 27 $Tapper::MCP::Control::VERSION = '5.0.9';
4 27 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 27 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 27 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 27 ▶use Tapper::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 27 ▶use Tapper::Model qw/model/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 27 extends 'Tapper::MCP';
12  
13 27 has testrun => (is => 'ro',
14 isa => 'Tapper::Schema::TestrunDB::Result::Testrun',
15 );
16  
17  
18  
19 36 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=4 SCAR=13.9
20 36 my $orig = shift;
21 36 my $class = shift;
22  
23  
24 36 my $args;
25 36 ▶ if ( @_ == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 1) 36 0 36
26 36 ▶ if (not ref $_[0] eq 'HASH' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not ref $_[0] eq 'HASH') { } 31 5 36
27 31 $args->{testrun} = $_[0];
28 } else {
29 5 $args = shift;
30 }
31 36 ▶ if (not ref $args->{testrun}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $args->{"testrun"}) 26 10 36
32 26 $args->{testrun} = model->resultset('Testrun')->find($args->{testrun});
33 }
34 36 return $args;
35 }
36 27 };
37  
38 27 1;
39  
40 __END__
« MCP/Scheduler/Host.pm ↑ Summary MCP/Plugin.pm »