Types.pm

filter: Statementstmt 100% 33 / 33 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 95.9% 47 / 49 CC 4 SCAR 6.9
CC
4
Cov
97%
import
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« blib/lib/MOP4Import/Util/compat_double_diamond_5_20.pm ↑ Summary FieldSpec.pm »
1 package MOP4Import::Types;
2 22 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 22 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use warnings qw(FATAL all NONFATAL misc);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 22 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 22 ▶use MOP4Import::Pairs -as_base, qw/Opts m4i_opts/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 # XXX: [carp_not => MOP4Import::Util]
9 22 ▶use MOP4Import::Declare::Type -as_base;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 22 ▶use MOP4Import::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 22 ▶use constant DEBUG => $ENV{DEBUG_MOP4IMPORT};
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 sub import {
15 42 ▶ my $myPack = shift;
Subroutine import: called CC=4 SCAR=13.9
16  
17 42 m4i_log_start() if DEBUG;
18  
19 42 my Opts $opts = m4i_opts([caller])->take_hash_maybe(\@_);
20  
21 42 $myPack->dispatch_pairs_as_declare(type => $opts, @_);
22  
23 42 my $tasks;
24 42 ▶ if ($tasks = $opts->{delayed_tasks} and @$tasks) {
Branch: 1 branch
BranchTrueFalseTotal
if ($tasks = $opts->{"delayed_tasks"} and @$tasks) 21 21 42
Condition66%2/3
$tasks = $opts->{"delayed_tasks"} and @$tasks
!ll&&!rl&&r
02121
MC/DC50%1/2
$tasks = $opts->{"delayed_tasks"} and @$tasks
$tasks = $opts->{"delayed_tasks"} @$tasks
Truth table66%2/3
A and B
A= $tasks = $opts->{"delayed_tasks"}B= @$tasks
ABresult
0X0
100
111
25 21 print STDERR " Calling delayed tasks for $opts->{destpkg}\n" if DEBUG;
26 21 $_->($opts) for @$tasks;
27 }
28  
29 42 m4i_log_end($opts->{callpack}) if DEBUG;
30 }
31  
32 22 1;
« blib/lib/MOP4Import/Util/compat_double_diamond_5_20.pm ↑ Summary FieldSpec.pm »