Pluggable/Plugin/TypeAhead.pm

filter: Statementstmt 74.0% 20 / 27 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 1 / 1 totaltotal 62.7% 27 / 43 SCAR 19.4
CC
5
Cov
57%
afterinit
19.5
BEGIN
1.0
BEGIN
1.0
CRAP 7.0
« Pluggable.pm ↑ Summary Pluggable/Plugin/DataPrinter.pm »
1 package DB::Pluggable::Plugin::TypeAhead;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Brickyard::Accessor rw => [qw(type ifenv)];
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Role::Basic;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 with qw(DB::Pluggable::Role::AfterInit);
8 2 our $VERSION = '1.112001';
9  
10 sub afterinit {
11 0 ▶ my $self = shift;
Subroutine afterinit: not called CC=5 SCAR=29.7
Pod documented
12 0 my $type = $self->type;
13 0 ▶ die "TypeAhead: need 'type' config key\n" unless defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
14 0 ▶ die "TypeAhead: 'type' must be an array reference of things to type\n"
Branch: 1 branch
BranchTrueFalseTotal
unless ref $type eq "ARRAY" 0 0 0
15 unless ref $type eq 'ARRAY';
16 0 ▶ if (my $env_key = $self->ifenv) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $env_key = $self->ifenv) 0 0 0
17 0 ▶ return unless $ENV{$env_key};
Branch: 1 branch
BranchTrueFalseTotal
unless $ENV{$env_key} 0 0 0
18 }
19 2 ▶ no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 0 push @DB::typeahead, @$type;
21 }
22 2 1;
23  
24 =pod
25  
26 =for stopwords typeahead afterinit
27  
28 =for test_synopsis 1;
29 __END__
« Pluggable.pm ↑ Summary Pluggable/Plugin/DataPrinter.pm »