Branch Coverage

lib/Data/Identifier/Generate.pm
Criterion Covered Total %
branch 71 170 41.7


line true false branch
117 69 1 $request >= 0 ? :
120 66 4 if ($request > 0) { }
1 3 elsif ($request < 0) { }
136 0 3 unless defined $type
137 0 3 unless defined $request and length $request
139 0 3 if ($type eq 'unicode') { }
0 3 elsif ($type eq 'ascii') { }
3 0 elsif ($type eq 'raw') { }
140 0 0 if ($request =~ /^[Uu]\+([0-9a-fA-F]+)$/u) { }
0 0 elsif ($request =~ /^[0-9]+\z/u) { }
148 0 0 if ($request =~ /^[0-9]+\z/u) { }
153 0 0 if $unicode_cp < 0 or $unicode_cp > 127
155 0 3 unless length $request == 1
161 0 3 if $unicode_cp < 0 or $unicode_cp > 1114111
165 0 3 if ($unicode_cp == 65532 or $unicode_cp == 65533 or $unicode_cp == 65279 or $unicode_cp == 65534)
166 0 0 unless $opts{'allow_special'}
191 0 9 if (ref $request)
192 0 0 if (eval { do { $request->can('epoch') } }) { }
201 3 6 unless (length($year // "") == 4)
202 0 3 if ($request eq 'now' or $request eq 'today') { }
3 0 elsif ($request =~ /^(?:0|-?[1-9][0-9]*)$/u) { }
206 0 3 if ($request > '32503680000')
222 0 9 if $year and $year < 1583 || $year > 9999
223 0 8 if $month and $month < 1 || $month > 12
224 0 7 if $day and $day < 1 || $day > 31
226 0 9 unless $year
227 1 8 unless $month
229 7 2 $day ? :
1 1 $month ? :
230 7 2 if ($precision eq 'day' and $day) { }
1 1 elsif ($precision eq 'month' and $month) { }
1 0 elsif ($precision eq 'year' and $year) { }
263 0 8 unless I18N::LangTags::List::is_decent($req)
267 0 8 unless (defined $name and length $name)
288 0 8 unless $request eq 0 or $request =~ /^[1-9][0-9]*$/u
302 8 0 if (defined $_multiplicity_names{$request})
316 0 0 if wantarray
318 0 0 if eval { do { $profile->can("ise") } }
326 0 0 if (defined(my $folding = $profile->{'case_folding'}))
327 0 0 if ($folding eq 'none') { }
0 0 elsif ($folding eq 'upper') { }
0 0 elsif ($folding eq 'lower') { }
338 0 0 if ($profile->{'strip_slash'})
342 0 0 if ($profile->{'strip_spaces'})
348 0 0 unless defined $order{$_}
351 0 0 if (defined(my $info = delete $opts{'info'}))
379 120 8 if (defined $generator)
380 92 28 unless ref $generator
385 0 128 if (defined(my $type = $opts{'type'}))
389 105 23 if (defined(my $style = $opts{'style'}) and defined(my $request = $opts{'request'}))
390 70 35 if ($style eq 'integer-based') { }
9 26 elsif ($style eq 'id-based') { }
21 5 elsif ($style eq 'name-based') { }
0 5 elsif ($style eq 'tag-based') { }
0 5 elsif ($style eq 'tagcombiner') { }
5 0 elsif ($style eq 'colour') { }
391 0 70 unless $request =~ /^(?:0|-?[1-9][0-9]*)$/u
396 1 8 if (($input, $name) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+) (.+)$/u) { }
8 0 elsif (($input) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+)$/u) { }
411 0 0 if (ref $request) { }
0 0 elsif ($request =~ 'Data::Identifier'->RE_UUID) { }
421 0 0 if (ref $request eq 'ARRAY') { }
425 0 0 if (ref $entry) { }
0 0 elsif ($entry =~ 'Data::Identifier'->RE_UUID) { }
434 0 0 unless scalar keys %uuids > 1
441 5 0 if (defined $request)
444 0 5 if (exists &Data::URIID::Colour::new)
448 5 0 if $req =~ /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/u
450 5 0 if ($req =~ /^#[a-f0-9]{36}$/u) { }
461 1 127 unless defined $opts{'input'}
464 27 100 ref $opts{'namespace'} ? :
468 203 305 if defined $opts{$key}
493 0 0 if (exists $tried->{$module}) { }
494 0 0 unless $tried->{$module}
503 0 0 if $res
524 0 0 if ($source eq 'Crypt::URandom') { }
0 0 elsif ($source eq 'UUID4::Tiny') { }
0 0 elsif ($source eq 'Math::Random::Secure') { }
0 0 elsif ($source eq 'UUID::URandom') { }
0 0 elsif ($source eq 'UUID::Tiny::Patch::UseMRS') { }
0 0 elsif ($source eq 'UUID::Tiny') { }
0 0 elsif ($source eq 'Data::UUID') { }
546 0 0 if (defined $raw and length $raw == 16)
557 0 136 if ref $ns
561 0 136 unless length $ns == 16