| 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
| |||||||||||
| 14 | 0 | ▶ | die "TypeAhead: 'type' must be an array reference of things to type\n" | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | unless ref $type eq 'ARRAY'; | ||||||||||
| 16 | 0 | ▶ | if (my $env_key = $self->ifenv) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | ▶ | return unless $ENV{$env_key}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||