| 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
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||