Branch Coverage

blib/lib/Locale/CLDR.pm
Criterion Covered Total %
branch 242 466 51.9


line true false branch
66 20 0 if (defined &CORE::fc) { }
545 0 0 unless $language eq 'und'
570 0 0 if $script
597 0 0 if $region
615 225 93 $_ ? :
622 16 90 $self->has_likely_subtag ? :
16 90 $self->has_likely_subtag ? :
16 90 $self->has_likely_subtag ? :
629 225 93 unless $path[$i] eq 'und' or $path[$i] eq 'Any'
643 86 186 if (Class::Load::try_load_class($module_name, {-'version', $VERSION})) { }
657 0 105 if (ref $module eq 'Locale::CLDR::Locales::Root')
1096 4 142 unless defined $name
1097 0 142 unless (defined $value)
1123 0 98 unless defined $rules{$rule_number}
1129 163 33 if ($operand =~ / \S /msux) { }
1138 84 14 $opp eq "\327" ? :
1152 0 98 if (@_ > 1 and ref $_[-1] eq 'HASH')
1156 77 21 if (1 == @_ and not ref $_[0])
1167 122 186 unless defined $_
1179 21 77 unless (keys %args)
1181 0 21 ref $_[0] ? :
1186 5 93 if (defined $args{'extensions'} and not ref $args{'extensions'})
1194 94 4 if defined $args{'language_id'}
1195 82 16 if defined $args{'script_id'}
1196 84 14 if defined $args{'region_id'}
1197 82 16 if defined $args{'variant_id'}
1341 66 2 if ($self->_test_default_ca) { }
1351 2 8 if ($default) { }
1367 20 0 if ($self->_test_default_cf) { }
1385 25 7 if ($self->script_id)
1389 25 7 if ($self->region_id)
1393 3 29 if ($self->variant_id)
1397 0 32 if (defined $self->extensions)
1412 0 0 if ($self->language_id eq 'en') { }
1485 3292 0 $self->has_likely_subtag ? :
1490 3214 78 if ($self->method_cache->{$id}{$method_name})
1493 2440 774 wantarray ? :
1497 78 312 if $module eq 'Moose::Object'
1498 118 194 if ($module->meta->has_method($method_name))
1503 0 78 unless $self->method_cache->{$id}{$method_name}
1506 65 13 wantarray ? :
1531 1 0 $name->region_id ? :
1 5 ref $name ? :
1539 4 2 if defined $display_name
1543 2 0 unless (ref $name)
1572 5 3 ref $name ? :
1576 7 1 if ($code)
1579 7 0 if (defined $display_name)
1587 1 7 unless (defined $language)
1590 1 0 if (defined $display_name)
1637 3 4 unless (ref $name)
1641 3 4 if (ref $name and not $name->script_id)
1647 3 1 if ($name)
1650 3 0 if (defined $script)
1656 1 3 unless ($script)
1659 1 0 if (defined $script)
1705 5 4 unless (ref $name)
1709 0 9 if (ref $name and not $name->region_id)
1715 7 2 if ($name)
1718 7 0 if (defined $region)
1724 2 7 unless (defined $region)
1727 2 0 if (defined $region)
1773 4 3 unless (ref $name)
1777 3 3 unless $name->variant_id
1779 3 0 if ($name->has_variant)
1783 2 1 if (defined $variant)
1811 0 2 unless exists $valid_keys{$key} or exists $valid_keys{$alias} or exists $valid_keys{$name}
1818 3 0 if defined $return and length $return
1844 0 2 unless exists $valid_keys{$key} or $valid_keys{$alias} or $valid_keys{$name}
1845 2 1 unless $valid_keys{$key}
3 0 unless $valid_keys{$alias}
1 2 unless $valid_keys{$name}
0 3 unless &first(sub { $_ eq $type; } , @{[] unless $valid_keys{$key};}, @{[] unless $valid_keys{$alias};}, @{[] unless $valid_keys{$name};})
1851 3 0 if defined $type
1869 2 4 if $name eq 'METRIC'
1874 6 0 if defined $system
1895 1 0 if length $key
1917 0 3 unless &blessed($locale)
1919 0 3 unless $type =~ / \A (?: language | script | region ) \z /msux
1927 0 3 unless defined $text
1950 0 2 unless defined $orientation
1962 0 0 if ($casing eq 'titlecase-firstword') { }
0 0 elsif ($casing eq 'titlecase-words') { }
0 0 elsif ($casing eq 'lowercase-words') { }
1965 0 0 if ($words[0] =~ / \A \s /msux)
1998 0 10 if $^V lt v5.18.0
2084 2506 160 unless (($first) = $string =~ / \G ($rule->[0]) $rule->[1] /msux)
2099 3 157 (!$grapheme_split && length $gc) > $length ? :
2106 105 59 $rules->[$_][2] ? :
2110 59 105 unless $split
2141 2 4 if @parameters == 1
2143 6 0 unless $parameters[0] eq 'index'
2148 2 7 unless defined $characters
2149 3 4 if CORE::fc($parameters[1]) =~ /$characters/u
2168 0 1 unless defined $characters
2180 0 6 unless defined $ellipsis
2295 0 3 unless defined $quote
2303 0 3 unless defined $quote
2311 0 3 unless defined $quote
2319 0 3 unless defined $quote
2337 3 0 if ($inner == -1 or $outer > -1 and $inner > -1 and $outer < $inner)
2364 0 1 unless defined $info
2456 728 20 if (exists $bundle->units->{$type}{$what}{$plural})
2461 0 20 if (exists $bundle->units->{$type}{$what}{'other'})
2468 10 728 unless ($format)
2473 0 10 unless $type
2475 4 12 if (exists $bundle->units->{$type}{$what}{$plural})
2480 0 12 if (exists $bundle->units->{$type}{$what}{'other'})
2490 6 732 if (not $format and my($dividend, $divisor) = $what =~ /^(.+)-per-(.+)$/u)
2495 0 732 unless $format
2509 6 0 if ($divisor)
2523 0 0 if (exists $bundle->units->{$type}{'per'}{''})
2530 0 0 unless ($format)
2536 0 0 if (exists $bundle->units->{$type}{'per'}{'1'})
2562 0 0 if (exists $bundle->units->{'long'}{$what}{'name'})
2572 0 0 unless $type
2574 0 0 if (exists $bundle->units->{$type}{$what}{'name'})
2589 4 4 if (exists $bundle->units->{$type}{$what}{'per'})
2598 0 2 unless $type
2600 2 0 if (exists $bundle->units->{$type}{$what}{'per'})
2616 0 24 if (exists $bundle->number_symbols->{$symbols_type}{'alias'})
2622 12 12 if exists $bundle->number_symbols->{$symbols_type}{'timeSeparator'}
2645 7 2 if $parsed =~ s/$entry/$self->format_number(shift @data, $num_format);/eu
2675 1 1 $test_str =~ $bundle->yesstr ? :
2692 1 1 $test_str =~ $bundle->nostr ? :
2723 0 0 ref $_ ? :
2728 0 0 if $@
2729 0 0 if $@
2748 0 0 unless pos $text < length $text
2762 0 0 if ($to_transform)
2764 0 0 if ($rule->{'type'} eq 'transform') { }
2783 0 0 if ($_ eq 'nfc') { }
0 0 elsif ($_ eq 'nfd') { }
0 0 elsif ($_ eq 'nfkd') { }
0 0 elsif ($_ eq 'nfkc') { }
0 0 elsif ($_ eq 'lower') { }
0 0 elsif ($_ eq 'upper') { }
0 0 elsif ($_ eq 'title') { }
0 0 elsif ($_ eq 'null') { }
0 0 elsif ($_ eq 'remove') { }
2824 0 0 if length $rule->{'before'} and not $text =~ /$rule->{'before'}\G/u
2826 0 0 if length $rule->{'after'}
2828 0 0 if length $rule->{'after'}
2829 0 0 if ($text =~ s/\G$regex/eval $result;/eu)
2859 1 4 unless @data
2860 1 3 if 1 == @data
2870 1 2 if (my $pattern = $list_data{scalar @data})
2953 0 16 if (exists $months->{$default_calendar}{'alias'})
2958 4 12 if (exists $months->{$default_calendar}{$type}{$width}{'alias'})
2964 8 4 if defined $result
2966 0 0 if ($default_calendar ne 'gregorian')
3026 0 13 if (exists $days->{$default_calendar}{'alias'})
3031 3 10 if (exists $days->{$default_calendar}{$type}{$width}{'alias'})
3036 7 3 if keys %$result
3038 0 0 if ($default_calendar ne 'gregorian')
3099 0 12 if (exists $quarters->{$default_calendar}{'alias'})
3104 3 9 if (exists $quarters->{$default_calendar}{$type}{$width}{'alias'})
3110 6 3 if keys %$result
3112 0 0 if ($default_calendar ne 'gregorian')
3177 0 0 $time < 1200 ? :
3196 0 38 if (exists $am_pm->{$default_calendar}{'alias'})
3201 0 38 if (exists $am_pm->{$default_calendar}{$type}{'alias'})
3206 9 29 if (exists $am_pm->{$default_calendar}{$type}{$width}{'alias'})
3216 80 60 unless exists $return{$_}
3304 0 9 if (exists $eras->{$default_calendar}{'alias'})
3309 0 9 if (exists $eras->{$default_calendar}{$width}{'alias'})
3319 9 0 if keys %$result
3321 0 0 if ($default_calendar ne 'gregorian')
3393 0 9 if (exists $date_formats->{'alias'})
3399 9 0 if $result
3401 0 0 if ($default_calendar ne 'gregorian')
3447 0 9 if (exists $time_formats->{$default_calendar}{'alias'})
3453 9 0 if ($result)
3459 0 0 if ($default_calendar ne 'gregorian')
3504 0 5 if (exists $datetime_formats->{$default_calendar}{'alias'})
3510 5 0 if $result
3512 0 0 if ($default_calendar ne 'gregorian')
3590 0 0 if $result
3623 0 0 if $result
3638 0 0 if $result
3646 1 0 $self->time_format_short =~ /h|K/u ? :
3672 0 163 unless length $regex
3704 99 0 if $set =~ /^ \s* # Possible white space \[ # Opening set ^? # Possible negation (?: # One of [^\[\]]++ # Not an open or close set | # Or (?<=\\)[\[\]] # An open or close set preceded by | # Or (?: \s* # Possible white space (?&posix) # A posix class (?! # Not followed by \s* # Possible white space [&-] # A Unicode regex op \s* # Possible white space \[ # A set opener ) ) )+ \] # Close the set \s* # Possible white space $ $posix /ux
99 0 if ($normal)
3876 3 2 if exists $week_data_hash->{$region_id}
3880 0 8 unless defined $region_id
3881 2 6 if exists $week_data_hash->{$region_id}
3977 0 1 if ($context eq 'numeric') { }
3994 0 2 if (exists $month_patterns->{$default_calendar}{'alias'})
4000 1 1 if (exists $month_patterns->{$default_calendar}{$context}{$width}{'alias'})
4007 1 0 if $result
4009 0 0 if ($default_calendar ne 'gregorian')
4015 1 0 if ($result)
4046 0 3 if (my $alias_calendar = $cyclic_name_set->{$default_calendar}{'alias'})
4051 0 3 if (my $type_alias = $cyclic_name_set->{$default_calendar}{$type}{'alias'})
4056 1 2 if (my $width_alias = $cyclic_name_set->{$default_calendar}{$type}{$context}{$width}{'alias'})
4068 1 1 if @$return
4197 0 2 if defined $default_currency_format and $default_currency_format ne 'standard' and $default_currency_format ne 'account'
4210 0 22 if (exists $format->{$default_numbering_system}{'alias'})
4215 0 22 if (exists $format->{$default_numbering_system}{'pattern'}{'default'}{$default_currency_format}{'alias'})
4221 22 0 if exists $format->{$default_numbering_system}{'pattern'}{'default'}{$default_currency_format}
4224 11 11 if $default_currency_format eq 'account'
4230 11 11 defined $format->{$default_numbering_system}{'pattern'}{'default'}{$default_currency_format}{'negative'} ? :
4310 8 9 if $self->_test_default_cu
4314 0 9 unless ($region_id)
4321 9 0 if exists $default_currencies->{$region_id}
4325 0 0 unless $region_id
4326 0 0 if (exists $default_currencies->{$region_id})
4348 17 0 if $symbol
4410 0 0 if $override = $bundle->collation->{$type}
4413 0 0 if ($type ne 'standard' and not $override)
4415 0 0 if $override = $bundle->collation->{'standard'}
4425 0 0 if ref $self->extensions and $self->extensions->{'co'}
4430 0 0 if $collation_type = $bundle->collation_type
4439 0 0 if ref $self->extensions and $self->extensions->{'ka'}
4444 0 0 if $collation_alternate = $bundle->collation_alternate
4453 0 0 if ref $self->extensions and $self->extensions->{'kb'}
4458 0 0 if $collation_backwards = $bundle->collation_backwards
4467 0 0 if ref $self->extensions and $self->extensions->{'kc'}
4472 0 0 if $collation_case_level = $bundle->collation_case_level
4481 0 0 if ref $self->extensions and $self->extensions->{'kf'}
4486 0 0 if $collation_case_ordering = $bundle->collation_case_ordering
4495 0 0 if ref $self->extensions and $self->extensions->{'kk'}
4500 0 0 if $collation_normalization = $bundle->collation_normalization
4509 0 0 if ref $self->extensions and $self->extensions->{'kn'}
4514 0 0 if $collation_numeric = $bundle->collation_numeric
4523 0 0 if ref $self->extensions and $self->extensions->{'kr'}
4528 0 0 if ref($collation_reorder = $bundle->collation_reorder) and @$collation_reorder
4538 0 0 if ($collation_strength)
4540 0 0 unless $collation_strength + 0
4548 0 0 if $collation_strength = $bundle->collation_strength
4557 0 0 if ref $self->extensions and $self->extensions->{'kv'}
4562 0 0 if $collation_max_variable = $bundle->collation_max_variable