Branch Coverage

lib/Data/Identifier/Generate.pm
Criterion Covered Total %
branch 53 160 33.1


line true false branch
92 47 1 $request >= 0 ? :
103 0 3 unless defined $type
104 0 3 unless defined $request and length $request
106 0 3 if ($type eq 'unicode') { }
0 3 elsif ($type eq 'ascii') { }
3 0 elsif ($type eq 'raw') { }
107 0 0 if ($request =~ /^[Uu]\+([0-9a-fA-F]+)$/u) { }
0 0 elsif ($request =~ /^[0-9]+\z/u) { }
115 0 0 if ($request =~ /^[0-9]+\z/u) { }
120 0 0 if $unicode_cp < 0 or $unicode_cp > 127
122 0 3 unless length $request == 1
128 0 3 if $unicode_cp < 0 or $unicode_cp > 1114111
132 0 3 if ($unicode_cp == 65532 or $unicode_cp == 65533 or $unicode_cp == 65279 or $unicode_cp == 65534)
133 0 0 unless $opts{'allow_special'}
159 0 9 if (ref $request)
160 0 0 if (eval { do { $request->can('epoch') } }) { }
169 3 6 unless (length($year // "") == 4)
170 0 3 if ($request eq 'now' or $request eq 'today') { }
3 0 elsif ($request =~ /^(?:0|-?[1-9][0-9]*)$/u) { }
174 0 3 if ($request > '32503680000')
190 0 9 if $year and $year < 1583 || $year > 9999
191 0 8 if $month and $month < 1 || $month > 12
192 0 7 if $day and $day < 1 || $day > 31
194 0 9 unless $year
195 1 8 unless $month
197 7 2 $day ? :
1 1 $month ? :
198 7 2 if ($precision eq 'day' and $day) { }
1 1 elsif ($precision eq 'month' and $month) { }
1 0 elsif ($precision eq 'year' and $year) { }
230 0 0 unless I18N::LangTags::List::is_decent($req)
234 0 0 unless (defined $name and length $name)
249 0 0 unless $request eq 0 or $request =~ /^[1-9][0-9]*$/u
264 0 0 if (defined $_multiplicity_names{$request})
277 0 0 if wantarray
279 0 0 if eval { do { $profile->can("ise") } }
287 0 0 if (defined(my $folding = $profile->{'case_folding'}))
288 0 0 if ($folding eq 'none') { }
0 0 elsif ($folding eq 'upper') { }
0 0 elsif ($folding eq 'lower') { }
299 0 0 if ($profile->{'strip_slash'})
303 0 0 if ($profile->{'strip_spaces'})
309 0 0 unless defined $order{$_}
312 0 0 if (defined(my $info = delete $opts{'info'}))
338 0 76 if (defined my $type)
342 67 9 if (defined(my $style = $opts{'style'}) and defined(my $request = $opts{'request'}))
343 48 19 if ($style eq 'integer-based') { }
0 19 elsif ($style eq 'id-based') { }
14 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') { }
344 0 48 unless $request =~ /^(?:0|-?[1-9][0-9]*)$/u
349 0 0 if (($input, $name) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+) (.+)$/u) { }
0 0 elsif (($input) = $request =~ /^(#?[a-zA-Z0-9\-\.\+]+)$/u) { }
364 0 0 if (ref $request) { }
0 0 elsif ($request =~ 'Data::Identifier'->RE_UUID) { }
374 0 0 if (ref $request eq 'ARRAY') { }
378 0 0 if (ref $entry) { }
0 0 elsif ($entry =~ 'Data::Identifier'->RE_UUID) { }
387 0 0 unless scalar keys %uuids > 1
394 5 0 if (defined $request)
397 5 0 if $req =~ /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/u
399 5 0 if ($req =~ /^#[a-f0-9]{36}$/u) { }
410 0 76 unless defined $opts{'input'}
413 14 62 ref $opts{'namespace'} ? :
417 62 14 if defined $tag->{'generator'} and not ref $tag->{'generator'}
429 0 0 if (exists $tried->{$module}) { }
430 0 0 unless $tried->{$module}
439 0 0 if $res
460 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') { }
482 0 0 if (defined $raw and length $raw == 16)
493 0 79 if ref $ns
497 0 79 unless length $ns == 16