blib/lib/Test/File/ShareDir/Dist.pm

filter: Statementstmt 92.8% 26 / 28 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 82.9% 34 / 41 CC 3 SCAR 6.2
CC
3
Cov
85%
import
3.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« lib/Test/File/ShareDir/TempDirObject.pm ↑ Summary lib/Test/File/ShareDir/Module.pm »
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
BranchTrueFalseTotal
if (not ref $arg or "HASH" ne ref $arg) 0 1 1
Condition33%1/3
not ref $arg or "HASH" ne ref $arg
l!l&&r!l&&!r
001
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
ABresult
1X1
011
000
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__
« lib/Test/File/ShareDir/TempDirObject.pm ↑ Summary lib/Test/File/ShareDir/Module.pm »