Branch Coverage

blib/lib/Package/CopyContents.pm
Criterion Covered Total %
branch 56 58 96.5


line true false branch
25 132 286 if $key =~ /::\z/
27 49 237 if ref $val eq 'CODE' or defined *$val{'CODE'}
28 286 0 if defined *$val{'SCALAR'}
29 64 222 if defined *$val{'ARRAY'}
30 52 234 if defined *$val{'HASH'}
36 11 1 ref $_[0] eq 'HASH' ? :
39 11 1 unless defined $opts->{'load'}
40 1 11 if ($opts->{'dclone'})
45 11 1 if ($opts->{'load'})
46 1 10 unless $INC{$src_pkg_pm}
51 11 1 unless defined $target_pkg
57 16 178 if ($name =~ /\A\$/ and $opts->{'skip_scalar'})
61 4 44 if ($name =~ /\A\@/ and $opts->{'skip_array'})
65 3 33 if ($name =~ /\A\%/ and $opts->{'skip_hash'})
69 3 34 if (not $name =~ /\A[\$\@\%]/ and $opts->{'skip_sub'})
73 4 285 if ($opts->{'exclude'} and grep {$name eq $_;} @{$$opts{'exclude'};})
78 87 198 exists $target_contents{$name} ? :
80 26 259 if ($opts->{'_before_copy'})
81 7 19 if $opts->{'_before_copy'}->($name, $src_pkg, $target_pkg, $opts, $overwrite)
83 7 278 if ($skip)
90 278 30 unless $skip
91 0 30 if ($opts->{'_on_skip'})
97 82 196 if ($overwrite) { }
103 173 105 if ($name =~ /\A\$(.+)/) { }
42 63 elsif ($name =~ /\A\@(.+)/) { }
31 32 elsif ($name =~ /\A\%(.+)/) { }
108 4 38 $opts->{'dclone'} ? :
111 3 28 $opts->{'dclone'} ? :
116 26 252 if ($opts->{'_after_copy'})