Branch Coverage

blib/lib/CPAN/Meta/Validator.pm
Criterion Covered Total %
branch 67 126 53.1


line true false branch
492 665 70 unless defined $self->{'errors'}
528 4 6718 if (ref $spec ne 'HASH')
533 2 6716 if (ref $data ne 'HASH')
539 19093 7588 unless $spec->{$key}{'mandatory'}
540 7566 22 if defined $data->{$key}
548 14349 12957 if ($spec->{$key}) { }
12957 0 elsif ($spec->{':key'}) { }
549 10712 3637 if ($spec->{$key}{'value'}) { }
2625 1012 elsif ($spec->{$key}{'map'}) { }
1012 0 elsif ($spec->{$key}{'list'}) { }
561 9560 3397 if ($spec->{':key'}{'value'}) { }
3397 0 elsif ($spec->{':key'}{'map'}) { }
0 0 elsif ($spec->{':key'}{'list'}) { }
582 2 1010 if (ref $data ne 'ARRAY')
587 0 1010 if (defined $spec->{'mandatory'})
588 0 0 unless (defined $data->[0])
595 1729 0 if (defined $spec->{'value'}) { }
0 0 elsif (defined $spec->{'map'}) { }
0 0 elsif (defined $spec->{'list'}) { }
0 0 elsif ($spec->{':key'}) { }
720 0 0 if (defined $value)
721 0 0 if $value and $value =~ /^--- #YAML:1.0/
729 159 0 if (defined $value) { }
731 22 137 if ($version =~ /_/) { }
732 22 0 if $value =~ /\A(?:testing|unstable)\z/
736 137 0 if $value =~ /\A(?:stable|testing|unstable)\z/
753 714 0 if (defined $value)
755 0 714 unless (defined $scheme and length $scheme)
759 0 714 unless (defined $auth and length $auth)
772 380 0 if (defined $value)
773 380 0 if $value and $known_specs{$self->{'spec'}} eq $value
774 0 0 if ($value and $known_urls{$value})
787 4993 1 if (defined $value)
788 4992 1 if $value or $value =~ /^0$/
796 0 0 unless defined $value
797 0 0 if $value or $value =~ /^0$/
804 2421 0 if defined $value
811 8381 0 if (defined $value and $value || $value =~ /0/)
813 12 8439 unless $self->version($key, $_)
816 0 0 unless defined $value
823 12027 0 if (defined $value) { }
824 0 12027 unless $value or $value =~ /0/
825 12015 12 if $value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/
835 663 0 if (defined $value) { }
836 663 0 if $value =~ /^(0|1)$/
893 532 168 $self->{'spec'} < 2 ? :
894 699 1 if (defined $value) { }
895 697 2 if $value and exists $licenses->{$value}
905 98 0 if (defined $key) { }
908 98 0 if $key and $key =~ /^[_a-z]+$/i and $key =~ /[A-Z]/
918 203 0 if (defined $key) { }
919 203 0 if $key and $key =~ /^x_/i
929 0 0 if (defined $key) { }
930 0 0 if $key and $key =~ /^([a-z][_a-z]+)$/i
940 10802 0 if (defined $key) { }
941 10802 0 if $key and $key =~ /^[A-Za-z0-9_]+(::[A-Za-z0-9_]+)*$/
952 382 0 if (defined $key) { }
953 382 0 if length $key and grep {$key eq $_;} @valid_phases
954 0 0 if $key =~ /x_/i
965 448 0 if (defined $key) { }
966 448 0 if length $key and grep {$key eq $_;} @valid_relations
967 0 0 if $key =~ /x_/i
979 43 4 if $self->{'stack'}