Branch Coverage

blib/lib/String/License.pm
Criterion Covered Total %
branch 157 198 79.2


line true false branch
172 584 85 if (ref $id) { }
184 333 336 if ($type eq 'licensing') { }
218 0 336 unless $type =~ /^[a-z]/u
256 281706 31208 unless $+{'prop'} and $+{'prop'} eq $prop
257 27323 3885 unless $+{'org'} and $+{'org'} eq $org
258 0 3885 if $+{'version'}
259 173 3712 if $+{'other'}
260 430 3282 if $+{'until_date'}
281 321 10 if exists $L{'re_trait'}
395 5020 5650 unless /$type_re/u
397 2130 3520 if ($2 and $1 eq "singleversion")
400 270 5380 if ($2 and $1 eq "usage")
405 230 5420 if ($3 and $1 eq "trait")
406 50 180 if (substr($key, 0, 14) eq 'except_prefix_') { }
504 0 3 unless $version
522 5 328 if ($v) { }
523 2 3 $later ? :
524 2 3 if $later
529 5 328 if ($id2)
532 4 1 if ($v2) { }
533 2 2 $later2 ? :
534 2 2 if $later2
540 5 328 $v ? :
5 328 $desc2 ? :
4 329 $v2 ? :
559 43030 118498 unless $RE{"LICENSE_$id"}
568 1613 42 unless $string =~ /$RE{"TRAIT_$trait"}/u
570 0 44 if $self->contains_tag($-[0], $+[0])
578 288 126558 $pos_license{$pos}{$_} ? :
587 0 261 unless $license
589 15 246 if $self->contains_tag($pos, $pos_license{$pos}{$license}[1])
606 75 1565 if $self->contains_tag($-[0], $+[0])
628 11 1554 if ($+{'version_number'})
631 0 11 if ($+{'version_later'})
635 0 11 if (substr($string, $pos + $+[0]) =~ /$L{'LEFTANCHOR_version_of'}/u) { }
649 539 763181 if (substr($string, $pos) =~ /$RE{"NAME_$id"}/u)
658 980 0 if $match{$_} and $match{$_}{'name'}
661 192 0 if ($name and $match{$name}{'name'}{$pos} and not $self->contains_tag($pos, $match{$name}{'name'}{$pos}[1]) and !$skip_stepwise || $L_grant_atomic_incomplete{$name})
669 38 154 if (not $version and grep {$_ eq $name;} @L_type_versioned) { }
81 73 elsif (not $version and grep {$_ eq $name;} @L_type_singleversion) { }
671 4 34 if ($+{'version_number'})
675 0 4 if ($+{'version_later'})
686 3 78 if ($+{'version_later'})
692 4 188 if ($version)
697 3 189 if ($later)
701 3 0 if grep {$grant{$_};} @RE_NAME
709 96 235 if (grep {$match{$_}{'name'};} @agpl, @gpl, @lgpl)
717 14 109 if (defined $+{$_})
728 55 11861 if ($string =~ /$RE{"EXCEPTION_$_"}/u)
738 14 317 if ($string =~ /$RE{'TRAIT_generated'}/u)
748 29 302 if (grep {$match{$_}{'name'};} @lgpl)
750 0 29 if ($string =~ /$L{'multi_1'}/u)
758 68 263 if (grep {$match{$_}{'name'};} @gpl)
760 0 68 if ($string =~ /$L{'multi_2'}/u)
766 0 331 if @multilicenses
769 29 302 if (grep {$match{$_}{'name'};} @lgpl)
773 5 24 if ($string =~ /$L{'lgpl_5'}/u)
787 68 263 if (grep {$match{$_}{'name'};} @gpl)
789 2 66 if ($string =~ /$L{'gpl_7'}/u)
798 11 320 if ($match{'apache'}{'name'})
801 2 9 if ($string =~ /$L{'apache_1'}/u)
807 0 9 if ($string =~ /$L{'apache_2'}/u)
809 0 0 $3 ? :
816 1 8 if ($string =~ /$L{'apache_4'}/u)
828 0 331 if (not $license{'fsful'} and $string =~ /$L{'fsful'}/u)
843 0 331 if (not $license{'fsfullr'} and $string =~ /$L{'fsfullr'}/u)
861 0 8937 if $match{$id}{'custom'}
862 0 8874 if (not $grant{$id} and $L_grant_stepwise_incomplete{$id} || $force_atomic and $string =~ /$RE{"GRANT_$id"}/u)
866 0 0 if ($self->contains_tag($-[0], $+[0])) { }
876 63 8874 if ($grant{$id})
880 63 0 if ($L{'usage'}{$id})
883 63 0 if ($L{'series'}{$L{'usage'}{$id}})
897 0 70268 if (not $license{$id} || $grant{$id} || $match{$id}{'custom'} and $L_grant_stepwise_incomplete{$id} || $force_atomic and $string =~ /$RE{"GRANT_$id"}/u)
903 0 0 if ($self->contains_tag($-[0], $+[0])) { }
913 170 70333 if ($license{$id} or $grant{$id})
915 159 11 unless $match{$id}{'custom'}
918 170 0 if ($L{'series'}{$id})
928 231 33200 if $match{$id}{'custom'}
931 2 33198 if $license{'rpsl_1'} and grep {$id eq $_;} "mpl", "python"
933 0 33198 if $license{$id}
934 6 548 if (not $grant{$id} and $L_grant_stepwise_incomplete{$id} || $force_atomic and $RE{"GRANT_$id"} and $string =~ /$RE{"GRANT_$id"}/u)
939 4 2 if ($self->contains_tag($-[0], $+[0])) { }
949 16 33182 if ($grant{$id})
958 0 46588 if not $license{$id} and $match{$id}{'custom'}
963 45923 658 unless $license{$id} or $grant{$id} or $L_grant_stepwise_incomplete{$id} or $force_atomic
967 0 748 if $license{'caldera'} and $id eq "bsd"
968 0 748 if $license{'cube'} and $id eq "zlib"
969 0 748 if $license{'dsdp'} and $id eq "ntp"
970 0 748 if $license{'mit_cmu'} and $id eq "ntp_disclaimer"
971 0 748 if $license{'ntp_disclaimer'} and $id eq "ntp"
973 0 748 if (not $license{$id} || $grant{$id} and $string =~ /$RE{"GRANT_$id"}/u)
977 0 0 if ($self->contains_tag($-[0], $+[0])) { }
986 90 658 if ($license{$id} or $grant{$id})
1002 53 278 if (@$exceptions)
1003 20 33 if @expressions > 1
1010 28 303 if (@$flaws)
1031 311 20 if ($naming->list_schemes)
1032 311 0 unless $expr
1039 20 0 unless $license