| 1 | 12 | ▶ | use 5.008; # utf8 | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | 12 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 12 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 12 | ▶ | use utf8; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | package Path::IsDev::NegativeHeuristic::PerlINC; | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 12 | our $VERSION = '1.001003'; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | # ABSTRACT: White-list paths in Config.pm as being non-development roots. | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 12 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | ## no critic (RequireArgUnpacking, ProhibitSubroutinePrototypes) | ||||||||||||||||||||
| 15 | 16 | ▶ | sub _uniq (@) { | ||||||||||||||||||
|
Subroutine
_uniq: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 16 | my %seen = (); | |||||||||||||||||||
| 17 | 16 | return grep { not $seen{$_}++ } @_; | |||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 12 | ▶ | use Role::Tiny::With qw( with ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 36 | 12 | ▶ | use Config; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 12 | with 'Path::IsDev::Role::NegativeHeuristic', 'Path::IsDev::Role::Matcher::FullPath::Is::Any'; | |||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 16 | ▶ | sub paths { | ||||||||||||||||||
|
Subroutine
paths: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||
| 49 | 16 | my @sources; | |||||||||||||||||||
| 50 | 16 | push @sources, $Config{archlibexp}, $Config{privlibexp}, $Config{sitelibexp}, $Config{vendorlibexp}; | |||||||||||||||||||
| 51 | 16 | ▶ | return _uniq grep { defined and length } @sources; | ||||||||||||||||||
|
Condition66%2/3
defined $_ && length $_
MC/DC50%1/2
defined $_ && length $_
defined $_
length $_
Truth table66%2/3
A && B
A= defined $_B= length $_
| |||||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 16 | ▶ | sub excludes { | ||||||||||||||||||
|
Subroutine
excludes: called CC=2 SCAR=8.1
Pod
documented
| |||||||||||||||||||||
| 61 | 16 | my ( $self, $result_object ) = @_; | |||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 16 | ▶ | return unless $self->fullpath_is_any( $result_object, $self->paths ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 64 | 0 | return 1; | |||||||||||||||||||
| 65 | } | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | 12 | 1; | |||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | __END__ | ||||||||||||||||||||