Branch Coverage

blib/lib/Test/CPAN/Meta/YAML/Version.pm
Criterion Covered Total %
branch 99 114 86.8


line true false branch
369 21 23 unless ($$self{'spec'})
370 19 2 $$data{'meta-spec'} && $$data{'meta-spec'}{'version'} ? :
374 18 26 defined $$self{'errors'} ? :
379 18 23 unless $$self{'errors'}
404 1 349 if (ref $spec ne 'HASH')
409 3 346 if (ref $data ne 'HASH')
415 931 419 unless $$spec{$key}{'mandatory'}
416 415 4 if defined $$data{$key}
424 783 436 if ($$spec{$key}) { }
436 0 elsif ($$spec{':key'}) { }
425 480 303 if ($$spec{$key}{'value'}) { }
234 69 elsif ($$spec{$key}{'map'}) { }
69 0 elsif ($$spec{$key}{'list'}) { }
435 366 70 if ($$spec{':key'}{'value'}) { }
70 0 elsif ($$spec{':key'}{'map'}) { }
0 0 elsif ($$spec{':key'}{'list'}) { }
453 3 68 if (ref $data ne 'ARRAY')
458 0 68 if (defined $$spec{'mandatory'})
459 0 0 unless (defined $$data[0])
466 99 0 if (defined $$spec{'value'}) { }
0 0 elsif (defined $$spec{'map'}) { }
0 0 elsif (defined $$spec{'list'}) { }
0 0 elsif ($$spec{':key'}) { }
572 3 1 if (defined $value)
573 1 2 if $value and $value =~ /^--- #YAML:1.0/
585 28 2 if ($value) { }
588 2 26 unless ($scheme)
592 4 22 unless ($auth)
606 39 1 if (defined $value)
607 31 8 if $value and $known_specs{$$self{'spec'}} eq $value
608 6 2 if ($value and $known_urls{$value})
619 270 1 if (defined $value)
620 269 1 if $value or $value =~ /^0$/
628 1 3 unless defined $value
629 2 1 if $value or $value =~ /^0$/
636 68 1 if defined $value
643 298 1 if (defined $value and $value || $value =~ /0/)
645 1 302 unless $self->version($key, $_)
648 2 1 unless defined $value
655 457 2 if (defined $value) { }
656 1 456 unless $value or $value =~ /0/
657 452 4 if $value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/
667 6 2 if (defined $value) { }
668 4 2 if $value =~ /^(0|1|true|false)$/
696 60 1 if (defined $value) { }
697 56 4 if $value and exists $licenses{$value}
698 3 1 if $value
708 6 1 if (defined $key) { }
711 4 1 if $key and $key =~ /^[a-z]+$/i and $key =~ /[A-Z]/
721 79 1 if (defined $key) { }
722 73 6 if $key and $key =~ /^([a-z][-_a-z]*)$/
723 1 5 if $key and $key =~ /^x_([a-z][-_a-z]*)$/i
733 12 1 if (defined $key) { }
734 8 4 if $key and $key =~ /^([a-z][_a-z]+)$/i
744 369 1 if (defined $key) { }
745 361 8 if $key and $key =~ /^[A-Za-z0-9_]+(::[A-Za-z0-9_]+)*$/
759 25 48 if $$self{'stack'}