| 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
Condition66%2/3
$tasks = $opts->{"delayed_tasks"} and @$tasks
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
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||