lib/Net/SinFP3/Result.pm

filter: Statementstmt 44.8% 13 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 43.1% 19 / 44 CC 5 SCAR 27.5
CC
5
Cov
37%
new
30.0
take
2.0
print
2.0
CRAP 15.7
« lib/Net/SinFP3/Output.pm ↑ Summary lib/Net/SinFP3/Output/Console.pm »
1 #
2 # $Id: Result.pm,v 008243d3e89a 2018/07/21 14:54:07 gomor $
3 #
4 package Net::SinFP3::Result;
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use base qw(Class::Gomor::Array);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 our @AS = qw(
10 global
11 );
12 1 __PACKAGE__->cgBuildIndices;
13 1 __PACKAGE__->cgBuildAccessorsScalar(\@AS);
14  
15 0 ▶sub take {
Subroutine take: not called CC=1 SCAR=6.9
Pod documented
16 0 return [];
17 }
18  
19 0 ▶sub new {
Subroutine new: not called CC=5 SCAR=34.0
Pod documented
20 0 my $self = shift->SUPER::new(
21 @_,
22 );
23  
24 0 ▶ if (!defined($self->global)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->global) 0 0 0
25 0 die("[-] ".__PACKAGE__.": You must provide a global object\n");
26 }
27  
28 0 my $log = $self->global->log;
29  
30 0 my $take = $self->take;
31 # By default we take all Mode objects
32 0 ▶ if (@$take == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (@$take == 0) 0 0 0
33 0 return $self;
34 }
35  
36 0 my $search = ref($self->global->search);
37 0 for (@$take) {
38 0 ▶ if (/^$search$/) {
Branch: 1 branch
BranchTrueFalseTotal
if (/^$search$/) 0 0 0
39 0 return $self;
40 }
41 }
42  
43 0 $log->error("Search type [$search] not allowed with this plugin");
44 0 return;
45 }
46  
47 0 ▶sub print {
Subroutine print: not called CC=1 SCAR=6.9
Pod documented
48 0 my $self = shift;
49 0 return '';
50 }
51  
52 1 1;
53  
54 __END__
« lib/Net/SinFP3/Output.pm ↑ Summary lib/Net/SinFP3/Output/Console.pm »