Branch Coverage

lib/Data/Identifier/Generate.pm
Criterion Covered Total %
branch 48 152 31.5


line true false branch
92 5 1 $request >= 0 ? :
103 0 3 if ($type eq 'unicode') { }
0 3 elsif ($type eq 'ascii') { }
3 0 elsif ($type eq 'raw') { }
104 0 0 if ($request =~ /^[Uu]\+([0-9a-fA-F]+)$/u) { }
111 0 0 if $unicode_cp < 0 or $unicode_cp > 127
113 0 3 unless length $request == 1
117 0 3 if $unicode_cp < 0 or $unicode_cp > 1114111
121 0 3 if ($unicode_cp == 65532 or $unicode_cp == 65533 or $unicode_cp == 65279 or $unicode_cp == 65534)
122 0 0 unless $opts{'allow_special'}
148 0 9 if (ref $request)
149 0 0 if (eval { do { $request->can('epoch') } }) { }
158 3 6 unless (length($year // "") == 4)
159 0 3 if ($request eq 'now' or $request eq 'today') { }
3 0 elsif ($request =~ /^(?:0|-?[1-9][0-9]*)$/u) { }
163 0 3 if ($request > '32503680000')
179 0 9 if $year and $year < 1583 || $year > 9999
180 0 8 if $month and $month < 1 || $month > 12
181 0 7 if $day and $day < 1 || $day > 31
183 0 9 unless $year
184 1 8 unless $month
186 7 2 $day ? :
1 1 $month ? :
187 7 2 if ($precision eq 'day' and $day) { }
1 1 elsif ($precision eq 'month' and $month) { }
1 0 elsif ($precision eq 'year' and $year) { }
219 0 0 unless I18N::LangTags::List::is_decent($req)
223 0 0 unless (defined $name and length $name)
238 0 0 unless $request eq 0 or $request =~ /^[1-9][0-9]*$/u
253 0 0 if (defined $_multiplicity_names{$request})
266 0 0 if wantarray
268 0 0 if eval { do { $profile->can("ise") } }
276 0 0 if (defined(my $folding = $profile->{'case_folding'}))
277 0 0 if ($folding eq 'none') { }
0 0 elsif ($folding eq 'upper') { }
0 0 elsif ($folding eq 'lower') { }
288 0 0 if ($profile->{'strip_slash'})
292 0 0 if ($profile->{'strip_spaces'})
298 0 0 unless defined $order{$_}
301 0 0 if (defined(my $info = delete $opts{'info'}))
318 0 20 if (defined my $type)
322 11 9 if (defined(my $style = $opts{'style'}) and defined(my $request = $opts{'request'}))
323 6 5 if ($style eq 'integer-based') { }
0 5 elsif ($style eq 'id-based') { }
0 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') { }
324 0 6 unless $request =~ /^(?:0|-?[1-9][0-9]*)$/u
329 0 0 if (($input, $name) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+) (.+)$/u) { }
0 0 elsif (($input) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+)$/u) { }
344 0 0 if (ref $request) { }
0 0 elsif ($request =~ 'Data::Identifier'->RE_UUID) { }
354 0 0 if (ref $request eq 'ARRAY') { }
358 0 0 if (ref $entry) { }
0 0 elsif ($entry =~ 'Data::Identifier'->RE_UUID) { }
367 0 0 unless scalar keys %uuids > 1
374 5 0 if (defined $request)
377 5 0 if $req =~ /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/u
379 5 0 if ($req =~ /^#[a-f0-9]{36}$/u) { }
390 0 20 unless defined $opts{'input'}
393 0 20 ref $opts{'namespace'} ? :
397 20 0 if defined $tag->{'generator'} and not ref $tag->{'generator'}
409 0 0 if (exists $tried->{$module}) { }
410 0 0 unless $tried->{$module}
419 0 0 if $res
440 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') { }
462 0 0 if (defined $raw and length $raw == 16)
473 0 23 if ref $ns
477 0 23 unless length $ns == 16