Branch Coverage

blib/lib/DBIx/Class/Optional/Dependencies.pm
Criterion Covered Total %
branch 106 176 60.2


line true false branch
6 0 343 if ($ENV{'RELEASE_TESTING'})
7 0 0 if require warnings
8 0 0 if require strict
736 86 5 if (@_)
740 0 86 if ($action eq '-die_without') { }
0 86 elsif ($action eq '-list_missing') { }
86 0 elsif ($action eq '-skip_all_without') { }
0 0 elsif ($action =~ /^-/) { }
744 0 0 unless eval { do { $class->die_unless_req_ok_for(\@_); 1 } }
747 0 0 if $err
757 0 86 if do { local $@; defined eval { do { 'Test::Builder'->new->has_plan unless 'Test::Builder'->new->current_test } } }
760 0 0 unless 'Test::Builder'->new->current_test
766 84 2 if (my $missing = $class->req_missing_for(\@_))
769 0 0 if $ENV{'RELEASE_TESTING'} and $class->_groups_to_reqs(\@_)->{'release_testing_mandatory'}
817 263 2 (shift())->req_missing_for(shift()) ? :
827 30 354 $reqs->{'missing_envvars'} ? :
834 8 0 unless $mods_missing or $reqs->{'missing_envvars'}
841 30 346 if $reqs->{'missing_envvars'}
846 65 311 $reqs->{'modreqs_fully_documented'} ? :
855 8 349 unless my $modreq_errors = $self->_errorlist_for_modreqs($reqs->{'modreqs'})
858 619 117 $reqs->{'modreqs'}{$_} ? :
867 0 10 unless $tb ||= do { local $@; eval { do { 'Test::Builder'->new } } }
870 8 2 if (my $err = $self->req_missing_for($groups))
883 0 0 if (my $err = (shift())->req_missing_for(shift()))
900 60 31 if (defined $sep and ($last_prefix || '') eq $pref) { }
907 91 0 if $sep
927 319 880 $seen ? :
937 0 1435 unless $g =~ qr/ \A $groupname_re \z/x
940 2 1433 unless my $r = $dbic_reqs->{$g}
945 0 1433 if $r->{'env'} and not $is_toplevel
947 40 1393 if $seen->{$g}++
951 1291 102 unless $r->{'env'}
102 1291 if (my(@e) = @{[] unless $r->{'env'};})
953 0 102 unless $g =~ /^test_/
956 0 102 if @e % 2
965 196 102 unless shift @e
976 0 102 unless $some_envs_required
979 95 7 if ($some_required_missing)
987 366 1027 if (my $i = $dbic_reqs->{$g}{'include'})
988 282 84 unless ref $i eq 'ARRAY'
990 0 366 unless @$i
998 1187 1207 unless $$res_per_type{"base_$_"}
999 319 2075 $$res_per_type{"incs_$_"} ? :
1002 319 878 !$is_toplevel ? :
1020 700 184 unless ref $want eq 'ARRAY'
1023 4 880 unless @$want
1033 973 9 if ($piece =~ qr/ \A $groupname_re \z /x) { }
9 0 elsif (my($mod, $ver) = $piece =~ qr/ \A ($modname_re) \>\= ($modver_re) \z /x) { }
1038 0 9 if exists $ret->{'modreqs'}{$mod}
1043 0 9 if not defined $dbic_reqs->{'test_adhoc'}{'req'}{$mod} or $dbic_reqs->{'test_adhoc'}{'req'}{$mod} < $ver
1063 174 1219 if (my $ag = $dbic_reqs->{$requesting_group}{'augment'})
1067 0 174 unless $dbic_reqs->{$target_group}
1070 0 174 if $dbic_reqs->{$requesting_group}{'env'}
1073 0 174 if $dbic_reqs->{$target_group}{'env'}
1075 0 174 if (my(@foreign) = grep({$_ ne 'req';} keys %{$$ag{$target_group};}))
1082 49 125 if ($all_groups->{$target_group} and my $ar = $ag->{$target_group}{'req'})
1085 4 45 $all_groups->{$requesting_group}{'idx'} < $all_groups->{$target_group}{'idx'} ? :
1098 1344 49 unless $augmentations->{$group}
1101 0 2049 unless $_ =~ / \A $modname_re \z /x
1107 0 2049 unless ($req_bag->{$_} || 0) =~ qr/ \A $modver_re \z /x
1111 95 1298 if (my $e = $all_groups->{$group}{'missing_envvars'})
1116 304 1089 $ret->{'missing_envvars'} ? :
1120 2398 84 unless $augmentations->{$group}
1128 3917 54 if not exists $ret->{$type}{$mod} or ($req_bag->{$mod} || 0) > $ret->{$type}{$mod}
1136 971 422 if $all_groups->{$group}{'user_requested'}
1157 785 21 unless (exists $req_unavailability_cache{$m}{$v})
1160 11 774 if $SIG{'__DIE__'}
1162 664 121 $v ? :
1167 738 68 if $req_unavailability_cache{$m}{$v}
1184 0 30 if grep {length ref $_;} @INC
1192 5 619 if $_ and -d $_ and -f "$_/$fn"
55 5 unless grep {-r "$_/$fn" if $_ and -d $_ and -f "$_/$fn";} @INC
1198 20 35 $modreqs->{$_} ? :
1208 0 0 unless $pod_dir
1228 0 0 unless my $sqltver = $class->req_list_for('deploy')->{'SQL::Translator'}
1340 0 0 unless $info->{'modreqs_fully_documented'} and $info->{'augments'} || $info->{'modreqs'}
1351 0 0 unless $info->{'modreqs'}
0 0 if (keys %{{} unless $info->{'modreqs'};}) { }
1353 0 0 $info->{'modreqs'}{$_} ? :
1363 0 0 unless $info->{'augments'}
1371 0 0 if defined $info->{'modreqs'}{$_} and $info->{'modreqs'}{$_} == $newreqs->{$_} or defined $ag_info->{'modreqs'}{$_} and $ag_info->{'modreqs'}{$_} == $newreqs->{$_}
1375 0 0 if (keys %$newreqs)
1380 0 0 $newreqs->{$_} ? :
1649 0 0 unless eval { do { die unless open my $fh, '>', $podfn; die unless print $fh join("\n\n", @chunks); die unless print $fh "\n"; die unless close $fh } }
1650 0 0 unless open my $fh, '>', $podfn
1651 0 0 unless print $fh join("\n\n", @chunks)
1652 0 0 unless print $fh "\n"
1653 0 0 unless close $fh