Branch Coverage

blib/lib/String/License.pm
Criterion Covered Total %
branch 168 226 74.3


line true false branch
285 279737 30995 unless $+{'prop'} and $+{'prop'} eq $prop
286 27170 3825 unless $+{'org'} and $+{'org'} eq $org
287 0 3825 if $+{'version'}
288 170 3655 if $+{'other'}
289 401 3254 if $+{'until_date'}
310 321 10 if exists $L{'re_trait'}
424 5020 5650 unless /$type_re/u
426 2130 3520 if ($2 and $1 eq "singleversion")
429 270 5380 if ($2 and $1 eq "usage")
434 230 5420 if ($3 and $1 eq "trait")
435 50 180 if (substr($key, 0, 14) eq 'except_prefix_') { }
547 0 3 unless $ver
562 5 328 if ($v) { }
563 2 3 $later ? :
564 2 3 if $later
570 5 328 if ($id2)
573 4 1 if ($v2) { }
574 2 2 $later2 ? :
575 2 2 if $later2
581 5 328 $v ? :
5 328 $desc2 ? :
4 329 $v2 ? :
597 43030 118498 unless $RE{"LICENSE_$id"}
610 1613 42 unless $string =~ /$RE{"TRAIT_$trait"}/u
615 0 44 if defined $coverage->get_range($-[0], $+[0])->get_element(0)
631 288 126558 $pos_license{$pos}{$_} ? :
640 0 261 unless $license
643 15 246 if defined $coverage->get_range($pos, $pos_license{$pos}{$license}->end)->get_element(0)
661 75 1565 if defined $coverage->get_range($-[0], $+[0])->get_element(0)
695 11 1554 if ($+{'version_number'})
704 0 11 if ($+{'version_later'})
714 0 11 if (substr($string, $pos + $+[0]) =~ /$L{'LEFTANCHOR_version_of'}/u) { }
734 539 763181 if (substr($string, $pos) =~ /$RE{"NAME_$id"}/u)
747 980 0 if $match{$_} and $match{$_}{'name'}
750 192 0 if ($name and $match{$name}{'name'}{$pos} and not defined $coverage->get_range($pos, $match{$name}{'name'}{$pos}->end)->get_element(0) and !$skip_stepwise || $L_grant_atomic_incomplete{$name})
762 38 154 if (not $version and grep {$_ eq $name;} @L_type_versioned) { }
81 73 elsif (not $version and grep {$_ eq $name;} @L_type_singleversion) { }
764 4 34 if ($+{'version_number'})
773 0 4 if ($+{'version_later'})
789 3 78 if ($+{'version_later'})
800 4 188 if ($version)
805 3 189 if ($later)
814 3 0 if grep {$grant{$_};} @RE_NAME
827 96 235 if (grep {$match{$_}{'name'};} @agpl, @gpl, @lgpl)
835 14 109 if (defined $+{$_})
850 55 11861 if ($string =~ /$RE{"EXCEPTION_$_"}/u)
866 14 317 if ($string =~ /$RE{'TRAIT_generated'}/u)
880 29 302 if (grep {$match{$_}{'name'};} @lgpl)
882 0 29 if ($string =~ /$L{'multi_1'}/u)
899 68 263 if (grep {$match{$_}{'name'};} @gpl)
901 0 68 if ($string =~ /$L{'multi_2'}/u)
910 0 331 if @multilicenses
913 29 302 if (grep {$match{$_}{'name'};} @lgpl)
917 5 24 if ($string =~ /$L{'lgpl_5'}/u)
940 68 263 if (grep {$match{$_}{'name'};} @gpl)
942 2 66 if ($string =~ /$L{'gpl_7'}/u)
956 0 331 if (grep {$match{$_}{'name'};} @L_contains_bsd and $string =~ /$L{'bsd_1'}/u)
967 0 0 if $license{'bsd_4_clause'}
968 0 0 if ($string =~ /$RE{'TRAIT_clause_advertising'}/u)
978 0 0 if $license{'bsd_3_clause'}
979 0 0 if ($string =~ /$RE{'TRAIT_clause_non_endorsement'}/u)
989 0 0 if $license{'bsd_2_clause'}
990 0 0 if ($string =~ /$RE{'TRAIT_clause_reproduction'}/u)
994 0 0 if defined $coverage->get_range($-[0], $+[0])->get_element(0)
1011 11 320 if ($match{'apache'}{'name'})
1014 2 9 if ($string =~ /$L{'apache_1'}/u)
1025 0 9 if ($string =~ /$L{'apache_2'}/u)
1032 0 0 $3 ? :
1039 1 8 if ($string =~ /$L{'apache_4'}/u)
1056 330 1 unless ($license{'fsful'})
1057 0 330 if ($string =~ /$L{'fsful'}/u)
1080 330 1 unless ($license{'fsfullr'})
1081 0 330 if ($string =~ /$L{'fsfullr'}/u)
1105 0 8937 if $match{$id}{'custom'}
1106 0 8874 if (not $grant{$id} and $L_grant_stepwise_incomplete{$id} || $force_atomic)
1109 0 0 if ($string =~ /$RE{"GRANT_$id"}/u)
1116 0 0 unless (defined $coverage->get_range($-[0], $+[0])->get_element(0))
1132 63 8874 if ($grant{$id})
1140 63 0 if ($L{'usage'}{$id})
1143 63 0 if ($L{'series'}{$L{'usage'}{$id}})
1157 321 69947 if (not $license{$id} || $grant{$id} || $match{$id}{'custom'} and $L_grant_stepwise_incomplete{$id} || $force_atomic)
1162 0 321 if ($string =~ /$RE{"GRANT_$id"}/u)
1169 0 0 unless (defined $coverage->get_range($-[0], $+[0])->get_element(0))
1185 170 70333 if ($license{$id} or $grant{$id})
1189 77 93 if $grant{$id}
1191 159 11 unless $match{$id}{'custom'}
1194 170 0 if ($L{'series'}{$id})
1204 231 33200 if $match{$id}{'custom'}
1210 2 33198 if $id eq "cc_by" and grep {$_->name eq "grant(cc_by_sa_3)";} @clues
1213 2 33196 if $license{'rpsl_1'} and grep {$id eq $_;} "mpl", "python"
1215 0 33196 if $license{$id}
1216 554 32628 if (not $grant{$id} and $L_grant_stepwise_incomplete{$id} || $force_atomic)
1219 554 0 if ($RE{"GRANT_$id"})
1220 6 548 if ($string =~ /$RE{"GRANT_$id"}/u)
1227 2 4 unless (defined $coverage->get_range($-[0], $+[0])->get_element(0))
1245 16 33180 if ($grant{$id})
1258 0 46588 if not $license{$id} and $match{$id}{'custom'}
1263 45923 658 unless $license{$id} or $grant{$id} or $L_grant_stepwise_incomplete{$id} or $force_atomic
1267 0 748 if $license{'caldera'} and $id eq "bsd"
1268 0 748 if $license{'cube'} and $id eq "zlib"
1269 0 748 if $license{'dsdp'} and $id eq "ntp"
1270 0 748 if $license{'mit_cmu'} and $id eq "ntp_disclaimer"
1271 0 748 if $license{'ntp_disclaimer'} and $id eq "ntp"
1273 0 748 if (not $license{$id} || $grant{$id} and $string =~ /$RE{"GRANT_$id"}/u)
1283 0 0 unless (defined $coverage->get_range($-[0], $+[0])->get_element(0))
1297 90 658 if ($license{$id} or $grant{$id})
1301 12 78 if $grant{$id}
1310 53 278 if (@exceptions)
1311 20 33 if @expressions > 1
1318 28 303 if (@flaws)
1339 311 20 if ($naming->list_schemes)
1340 311 0 unless $expr
1347 20 0 unless $license