lib/Net/SinFP3/Search.pm

filter: Statementstmt 39.3% 13 / 33 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 100% 5 / 5 totaltotal 40.3% 21 / 52 CC 5 SCAR 21.3
CC
5
Cov
33%
init
20.0
new
6.0
take
2.0
CRAP 8.4
« lib/Net/SinFP3/Result/Passive.pm ↑ Summary lib/Net/SinFP3/Input/SignatureP.pm »
1 #
2 # $Id: Search.pm,v 008243d3e89a 2018/07/21 14:54:07 gomor $
3 #
4 package Net::SinFP3::Search;
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 new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
16 0 my $self = shift->SUPER::new(
17 @_,
18 );
19  
20 0 ▶ if (!defined($self->global)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->global) 0 0 0
21 0 die("[-] ".__PACKAGE__.": You must provide a global object\n");
22 }
23  
24 0 return $self;
25 }
26  
27 0 ▶sub take {
Subroutine take: not called CC=1 SCAR=6.9
Pod documented
28 0 return [];
29 }
30  
31 0 ▶sub init {
Subroutine init: not called CC=4 SCAR=30.0
Pod documented
32 0 my $self = shift;
33  
34 0 my $log = $self->global->log;
35  
36 0 my $take = $self->take;
37 # By default we take all Mode objects
38 0 ▶ if (@$take == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (@$take == 0) 0 0 0
39 0 return $self;
40 }
41  
42 0 my $mode = ref($self->global->mode);
43 0 for (@$take) {
44 0 ▶ if (/^$mode$/) {
Branch: 1 branch
BranchTrueFalseTotal
if (/^$mode$/) 0 0 0
45 0 return $self;
46 }
47 }
48  
49 0 $log->error("Mode type [$mode] not allowed with this plugin");
50 0 return;
51 }
52  
53 0 ▶sub run {
Subroutine run: not called CC=1 SCAR=6.9
Pod documented
54 0 my $self = shift;
55 0 return $self;
56 }
57  
58 0 ▶sub post {
Subroutine post: not called CC=1 SCAR=6.9
Pod documented
59 0 my $self = shift;
60 0 return $self;
61 }
62  
63 1 1;
64  
65 __END__
« lib/Net/SinFP3/Result/Passive.pm ↑ Summary lib/Net/SinFP3/Input/SignatureP.pm »