Branch Coverage

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


line true false branch
366 23 25 unless ($$self{'spec'})
367 21 2 $$data{'meta-spec'} && $$data{'meta-spec'}{'version'} ? :
371 18 30 defined $$self{'errors'} ? :
376 22 23 unless $$self{'errors'}
401 1 367 if (ref $spec ne 'HASH')
406 3 364 if (ref $data ne 'HASH')
412 1005 455 unless $$spec{$key}{'mandatory'}
413 451 4 if defined $$data{$key}
421 837 450 if ($$spec{$key}) { }
450 0 elsif ($$spec{':key'}) { }
422 512 325 if ($$spec{$key}{'value'}) { }
248 77 elsif ($$spec{$key}{'map'}) { }
77 0 elsif ($$spec{$key}{'list'}) { }
432 380 70 if ($$spec{':key'}{'value'}) { }
70 0 elsif ($$spec{':key'}{'map'}) { }
0 0 elsif ($$spec{':key'}{'list'}) { }
450 3 76 if (ref $data ne 'ARRAY')
455 0 76 if (defined $$spec{'mandatory'})
456 0 0 unless (defined $$data[0])
463 111 0 if (defined $$spec{'value'}) { }
0 0 elsif (defined $$spec{'map'}) { }
0 0 elsif (defined $$spec{'list'}) { }
0 0 elsif ($$spec{':key'}) { }
569 3 1 if (defined $value)
570 1 2 if $value and $value =~ /^--- #YAML:1.0/
582 28 2 if ($value) { }
585 2 26 unless ($scheme)
589 4 22 unless ($auth)
603 43 1 if (defined $value)
604 35 8 if $value and $known_specs{$$self{'spec'}} eq $value
605 6 2 if ($value and $known_urls{$value})
616 298 1 if (defined $value)
617 297 1 if $value or $value =~ /^0$/
625 1 3 unless defined $value
626 2 1 if $value or $value =~ /^0$/
633 68 1 if defined $value
640 310 1 if (defined $value and $value || $value =~ /0/)
642 1 314 unless $self->version($key, $_)
645 2 1 unless defined $value
652 477 2 if (defined $value) { }
653 1 476 unless $value or $value =~ /0/
654 472 4 if $value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/
664 6 2 if (defined $value) { }
665 4 2 if $value =~ /^(0|1|true|false)$/
693 64 1 if (defined $value) { }
694 60 4 if $value and exists $licenses{$value}
695 3 1 if $value
705 6 1 if (defined $key) { }
708 4 1 if $key and $key =~ /^[a-z]+$/i and $key =~ /[A-Z]/
718 81 1 if (defined $key) { }
719 75 6 if $key and $key =~ /^([a-z][-_a-z]*)$/
720 1 5 if $key and $key =~ /^x_([a-z][-_a-z]*)$/i
730 12 1 if (defined $key) { }
731 8 4 if $key and $key =~ /^([a-z][_a-z]+)$/i
741 381 1 if (defined $key) { }
742 373 8 if $key and $key =~ /^[A-Za-z0-9_]+(::[A-Za-z0-9_]+)*$/
756 25 48 if $$self{'stack'}