| 1 | 2 | ▶ | use 5.006; # pragmas | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||
| 5 | package Test::File::ShareDir::Dist; | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | our $VERSION = '1.001002'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | # ABSTRACT: Simplified dist oriented ShareDir tester | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 2 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 2 | ▶ | use File::ShareDir 1.00 qw(); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | 2 | ▶ | use Test::File::ShareDir::Utils qw( extract_dashes ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1 | ▶ | sub import { | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=3 SCAR=11.9
| |||||||||||||||||||||||||||||
| 28 | 1 | my ( undef, $arg ) = @_; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 1 | ▶ | if ( not ref $arg or 'HASH' ne ref $arg ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not ref $arg or "HASH" ne ref $arg
MC/DC0%0/2
not ref $arg or "HASH" ne ref $arg
not ref $arg
"HASH" ne ref $arg
Truth table33%1/3
not(A) or B
A= not ref $argB= "HASH" ne ref $arg
| |||||||||||||||||||||||||||||
| 31 | 0 | require Carp; | |||||||||||||||||||||||||||
| 32 | 0 | return Carp::croak q[Must pass a hashref]; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 1 | my %input_config = %{$arg}; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 1 | require Test::File::ShareDir::Object::Dist; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 1 | my $dist_object = Test::File::ShareDir::Object::Dist->new(extract_dashes('dists', \%input_config )); | |||||||||||||||||||||||||||
| 40 | 1 | $dist_object->install_all_dists(); | |||||||||||||||||||||||||||
| 41 | 1 | $dist_object->register(); | |||||||||||||||||||||||||||
| 42 | 1 | return 1; | |||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 2 | 1; | |||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | __END__ | ||||||||||||||||||||||||||||