Branch Coverage

blib/lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm
Criterion Covered Total %
branch 78 174 44.8


line true false branch
6 0 38 if ($ENV{'RELEASE_TESTING'})
7 0 0 if require warnings
8 0 0 if require strict
502 17 1 if (@_)
506 0 17 if ($action eq '-die_without') { }
0 17 elsif ($action eq '-list_missing') { }
17 0 elsif ($action eq '-skip_all_without') { }
0 0 elsif ($action =~ /^-/) { }
510 0 0 unless eval { do { $class->die_unless_req_ok_for(\@_); 1 } }
513 0 0 if $err
523 0 17 if do { local $@; defined eval { do { "Test::Builder"->new->has_plan unless "Test::Builder"->new->current_test } } }
526 0 0 unless "Test::Builder"->new->current_test
532 17 0 if (my $missing = $class->req_missing_for(\@_))
535 0 0 if $ENV{'RELEASE_TESTING'} and $class->_groups_to_reqs(\@_)->{'release_testing_mandatory'}
583 1 0 (shift())->req_missing_for(shift()) ? :
593 15 3 $reqs->{'missing_envvars'} ? :
600 0 5 unless $mods_missing or $reqs->{'missing_envvars'}
607 15 3 if $reqs->{'missing_envvars'}
612 3 15 $reqs->{'modreqs_fully_documented'} ? :
621 0 3 unless my $modreq_errors = $self->_errorlist_for_modreqs($reqs->{'modreqs'})
624 8 1 $reqs->{'modreqs'}{$_} ? :
633 0 0 unless $tb ||= do { local $@; eval { do { "Test::Builder"->new } } }
636 0 0 if (my $err = $self->req_missing_for($groups))
647 0 0 if (my $err = (shift())->req_missing_for(shift()))
664 20 19 if (defined $sep and ($last_prefix || '') eq $pref) { }
671 39 0 if $sep
691 14 21 $seen ? :
701 0 39 unless $g =~ qr/ \A $groupname_re \z/x
704 0 39 unless my $r = $dbic_reqs->{$g}
709 0 39 if $r->{'env'} and not $is_toplevel
711 0 39 if $seen->{$g}++
715 20 19 unless $r->{'env'}
19 20 if (my(@e) = @{[] unless $r->{'env'};})
717 0 19 unless $g =~ /^test_/
720 0 19 if @e % 2
729 20 19 unless shift @e
740 0 19 unless $some_envs_required
743 19 0 if ($some_required_missing)
751 14 25 if (my $i = $dbic_reqs->{$g}{'include'})
752 14 0 unless ref $i eq "ARRAY"
754 0 14 unless @$i
762 35 35 unless $$res_per_type{"base_$_"}
763 14 56 $$res_per_type{"incs_$_"} ? :
766 14 21 !$is_toplevel ? :
784 2 19 unless ref $want eq "ARRAY"
787 0 21 unless @$want
797 25 0 if ($piece =~ qr/ \A $groupname_re \z /x) { }
0 0 elsif (my($mod, $ver) = $piece =~ qr/ \A ($modname_re) \>\= ($modver_re) \z /x) { }
802 0 0 if exists $ret->{'modreqs'}{$mod}
807 0 0 if not defined $dbic_reqs->{'test_adhoc'}{'req'}{$mod} or $dbic_reqs->{'test_adhoc'}{'req'}{$mod} < $ver
827 2 37 if (my $ag = $dbic_reqs->{$requesting_group}{'augment'})
831 0 0 unless $dbic_reqs->{$target_group}
834 0 0 if $dbic_reqs->{$requesting_group}{'env'}
837 0 0 if $dbic_reqs->{$target_group}{'env'}
839 0 0 if (my(@foreign) = grep({$_ ne "req";} keys %{$$ag{$target_group};}))
846 0 0 if ($all_groups->{$target_group} and my $ar = $ag->{$target_group}{'req'})
849 0 0 $all_groups->{$requesting_group}{'idx'} < $all_groups->{$target_group}{'idx'} ? :
862 39 0 unless $augmentations->{$group}
865 0 38 unless $_ =~ / \A $modname_re \z /x
871 0 38 unless ($req_bag->{$_} || 0) =~ qr/ \A $modver_re \z /x
875 19 20 if (my $e = $all_groups->{$group}{'missing_envvars'})
880 31 8 $ret->{'missing_envvars'} ? :
884 47 0 unless $augmentations->{$group}
892 54 4 if not exists $ret->{$type}{$mod} or ($req_bag->{$mod} || 0) > $ret->{$type}{$mod}
900 25 14 if $all_groups->{$group}{'user_requested'}
921 10 0 unless (exists $req_unavailability_cache{$m}{$v})
923 8 2 $v ? :
928 9 1 if $req_unavailability_cache{$m}{$v}
945 0 15 if grep {length ref $_;} @INC
953 2 152 if $_ and -d $_ and -f "$_/$fn"
12 2 unless grep {-r "$_/$fn" if $_ and -d $_ and -f "$_/$fn";} @INC
959 6 6 $modreqs->{$_} ? :
969 0 0 unless $pod_dir
996 0 0 unless my $moosever = $class->req_list_for("use_moose")->{'Moose'}
1108 0 0 unless $info->{'modreqs_fully_documented'} and $info->{'augments'} || $info->{'modreqs'}
1119 0 0 unless $info->{'modreqs'}
0 0 if (keys %{{} unless $info->{'modreqs'};}) { }
1121 0 0 $info->{'modreqs'}{$_} ? :
1131 0 0 unless $info->{'augments'}
1139 0 0 if defined $info->{'modreqs'}{$_} and $info->{'modreqs'}{$_} == $newreqs->{$_} or defined $ag_info->{'modreqs'}{$_} and $ag_info->{'modreqs'}{$_} == $newreqs->{$_}
1143 0 0 if (keys %$newreqs)
1148 0 0 $newreqs->{$_} ? :
1417 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 } }
1418 0 0 unless open my $fh, ">", $podfn
1419 0 0 unless print $fh join("\n\n", @chunks)
1420 0 0 unless print $fh "\n"
1421 0 0 unless close $fh