| line |
true |
false |
branch |
|
34
|
0 |
0 |
unless ($instance)
|
|
38
|
0 |
0 |
if $debug
|
|
54
|
1 |
0 |
if (defined $params{'no_warnings'} and $params{'no_warnings'})
|
|
65
|
0 |
20 |
if $debug
|
|
68
|
19 |
1 |
if ($self->_read_configuration($conf_path))
|
|
78
|
0 |
20 |
unless -e $path
|
|
81
|
1 |
19 |
unless -e $compyaml
|
|
92
|
0 |
19 |
if $debug
|
|
94
|
0 |
19 |
unless -e $wwfile
|
|
106
|
0 |
19 |
if $loaded == 0
|
|
110
|
0 |
19 |
if $debug
|
|
113
|
0 |
19 |
if ($debug)
|
|
118
|
304 |
0 |
if (defined $rh_c->{'name'})
|
|
119
|
187 |
117 |
if (defined $rh_c->{'aliases'}) { }
|
|
131
|
187 |
117 |
if (defined $rh_c->{'aliases'})
|
|
141
|
0 |
19 |
if ($debug)
|
|
156
|
51 |
6 |
if (-e $yfile)
|
|
167
|
15 |
4 |
if (-d $abbrvdir)
|
|
168
|
0 |
15 |
unless opendir my $dh, $abbrvdir
|
|
173
|
331 |
30 |
if ($file =~ /^(\w\w)\.yaml$/)
|
|
201
|
355 |
3500 |
unless is_hashref($tpl)
|
|
204
|
251 |
3249 |
if (defined $tpl->{'replace'})
|
|
212
|
208 |
645 |
if ($pattern =~ /^(\w+)=(.+)$/) { }
|
|
217
|
0 |
208 |
if ($@)
|
|
224
|
0 |
645 |
if ($@)
|
|
240
|
461 |
3039 |
if (defined $tpl->{'postformat_replace'})
|
|
247
|
0 |
801 |
if ($@)
|
|
279
|
5676 |
28188 |
if (is_hashref($val)) { }
|
|
282
|
5676 |
0 |
if defined $default_name
|
|
324
|
5 |
1 |
if (defined $self->{'final_components'})
|
|
327
|
1 |
0 |
if $show_warnings
|
|
340
|
0 |
488 |
if ($debug)
|
|
349
|
0 |
7 |
if ($debug)
|
|
362
|
484 |
4 |
if ($cc)
|
|
372
|
2 |
486 |
if (defined $rh_options->{'only_address'})
|
|
376
|
0 |
488 |
if ($debug)
|
|
384
|
0 |
488 |
if ($debug)
|
|
400
|
3030 |
767 |
if defined $self->{'component_aliases'}{$c}
|
|
404
|
528 |
239 |
if (defined $self->{'component2type'}{$c})
|
|
407
|
415 |
113 |
unless (defined $rh_components->{$ptype})
|
|
419
|
334 |
40 |
if (scalar @aliases == 1)
|
|
427
|
40 |
5 |
if (defined $rh_components->{$c})
|
|
434
|
0 |
488 |
if ($debug)
|
|
443
|
2 |
486 |
if (defined $rh_options->{'address_template'}) { }
|
|
448
|
484 |
2 |
if (defined $rh_config->{'address_template'}) { }
|
|
|
2 |
0 |
elsif (defined $self->{'templates'}{'default'}{'address_template'}) { }
|
|
456
|
57 |
429 |
unless ($self->_minimal_components($rh_components))
|
|
457
|
0 |
57 |
if $debug
|
|
458
|
42 |
15 |
if (defined $rh_config->{'fallback_template'}) { }
|
|
|
14 |
1 |
elsif (defined $self->{'templates'}{'default'}{'fallback_template'}) { }
|
|
468
|
0 |
488 |
if $debug
|
|
472
|
0 |
488 |
if ($debug)
|
|
478
|
160 |
328 |
if (defined $rh_config->{'_compiled_replace'})
|
|
480
|
0 |
160 |
if ($debug)
|
|
488
|
0 |
488 |
if ($debug)
|
|
494
|
0 |
488 |
if ($debug)
|
|
499
|
3 |
485 |
if ($oa) { }
|
|
500
|
0 |
3 |
if ($debug)
|
|
507
|
230 |
255 |
if (scalar @$ra_unknown)
|
|
508
|
0 |
230 |
if ($debug)
|
|
516
|
0 |
230 |
if ($debug)
|
|
523
|
10 |
478 |
if ($abbrv)
|
|
534
|
0 |
488 |
if ($debug)
|
|
544
|
0 |
488 |
if ($debug)
|
|
567
|
0 |
490 |
if ($debug)
|
|
579
|
604 |
4 |
if (lc $piece ne "new york")
|
|
580
|
1 |
603 |
if $seen{$piece} > 1
|
|
595
|
50 |
504 |
if ($replacement =~ /\$\d/)
|
|
596
|
21 |
29 |
if ($text =~ /$regexp/)
|
|
615
|
332 |
157 |
if (defined $rh_components->{'postcode'})
|
|
616
|
1 |
331 |
if (length $rh_components->{'postcode'} > 20) { }
|
|
|
1 |
330 |
elsif ($rh_components->{'postcode'} =~ /\d+;\d+/) { }
|
|
|
1 |
329 |
elsif ($rh_components->{'postcode'} =~ /^(\d{5}),\d{5}/) { }
|
|
629
|
0 |
3800 |
if (not defined $rh_components->{$c}) { }
|
|
|
1 |
3799 |
elsif (not $rh_components->{$c} =~ /\w/) { }
|
|
|
1 |
3798 |
elsif ($rh_components->{$c} =~ m[https?://]) { }
|
|
652
|
235 |
737 |
unless defined $rh_components->{$c}
|
|
653
|
57 |
915 |
if $missing == $minimal_threshold
|
|
668
|
4 |
485 |
unless defined $rh_components->{'country_code'}
|
|
670
|
485 |
0 |
if (my $cc = lc $rh_components->{'country_code'})
|
|
673
|
0 |
485 |
if length $cc != 2
|
|
674
|
0 |
485 |
if $cc eq "uk"
|
|
682
|
46 |
439 |
if (defined $self->{'templates'}{$cc} and defined $self->{'templates'}{$cc}{'use_country'})
|
|
687
|
35 |
11 |
if (defined $self->{'templates'}{$old_cc}{'change_country'})
|
|
690
|
2 |
33 |
if ($new_country =~ /\$(\w*)/)
|
|
692
|
2 |
0 |
if (defined $rh_components->{$component}) { }
|
|
700
|
10 |
36 |
if (defined $self->{'templates'}{$old_cc}{'add_component'})
|
|
704
|
9 |
1 |
if (defined $valid_replacement_components{$k})
|
|
710
|
5 |
480 |
if ($cc eq "NL")
|
|
711
|
5 |
0 |
if (defined $rh_components->{'state'})
|
|
712
|
1 |
4 |
if ($rh_components->{'state'} eq "Cura\347ao") { }
|
|
|
0 |
4 |
elsif ($rh_components->{'state'} =~ /^sint maarten/i) { }
|
|
|
1 |
3 |
elsif ($rh_components->{'state'} =~ /^Aruba/i) { }
|
|
736
|
386 |
102 |
if (defined $rh_c->{'country'} and defined $rh_c->{'state'})
|
|
737
|
1 |
385 |
if (&looks_like_number($rh_c->{'country'}))
|
|
749
|
391 |
102 |
if (defined $rh_components->{'state'})
|
|
758
|
216 |
276 |
if (defined $rh_components->{'county'})
|
|
768
|
4 |
603 |
unless $rh_components->{'country_code'}
|
|
769
|
0 |
603 |
unless $rh_components->{$keyname}
|
|
773
|
32 |
571 |
if (defined $rh_components->{$code})
|
|
777
|
31 |
1 |
if $rh_components->{$code} ne $rh_components->{$keyname}
|
|
786
|
304 |
268 |
if (my $rev = $self->{$reverse_key}{$cc})
|
|
790
|
204 |
100 |
if (my $found_code = $rev->{$uc_name})
|
|
794
|
6 |
198 |
if ($uc_name eq $found_code)
|
|
796
|
6 |
0 |
if defined $full_name
|
|
801
|
2 |
24 |
if ($cc eq "US" and $keyname eq "state" and not defined $rh_components->{'state_code'})
|
|
802
|
0 |
2 |
if ($rh_components->{'state'} =~ /^united states/i)
|
|
805
|
0 |
0 |
if (my $fc = $$rev{uc $state})
|
|
809
|
2 |
0 |
if ($rh_components->{'state'} =~ /^washington,? d\.?c\.?/i)
|
|
824
|
0 |
163 |
if ($debug)
|
|
830
|
2 |
161 |
if (ref $ra_rules eq "ARRAY" and @$ra_rules and ref $ra_rules->[0] eq "ARRAY")
|
|
832
|
0 |
2 |
if $component eq "country_code"
|
|
833
|
0 |
2 |
if $component eq "house_number"
|
|
836
|
0 |
3 |
if ($ra_fromto->[0] =~ /^$component=/) { }
|
|
839
|
0 |
0 |
if ($rh_components->{$component} eq $from) { }
|
|
847
|
3 |
0 |
if (defined $regexp)
|
|
862
|
160 |
1202 |
if $component eq "country_code"
|
|
863
|
61 |
1141 |
if $component eq "house_number"
|
|
865
|
1990 |
5947 |
if (defined $rule->{'component'}) { }
|
|
867
|
1793 |
197 |
if $rule->{'component'} ne $component
|
|
868
|
4 |
193 |
if ($rh_components->{$component} eq $rule->{'exact_match'}) { }
|
|
886
|
2 |
10 |
unless (defined $rh_comp->{'country_code'})
|
|
887
|
1 |
1 |
if ($show_warnings)
|
|
889
|
1 |
0 |
if (defined $rh_comp->{'country'})
|
|
901
|
10 |
0 |
if (defined $self->{'country2lang'}{$cc})
|
|
907
|
11 |
3 |
if (defined $self->{'compiled_abbreviations'}{$lang}) { }
|
|
911
|
1 |
15 |
unless defined $rh_comp->{$comp_name}
|
|
928
|
0 |
981 |
if ($debug)
|
|
957
|
19 |
3701 |
if $seen_lines{$line} > 1
|
|
965
|
3914 |
10 |
if (lc $w ne "new york")
|
|
968
|
2 |
3922 |
if defined $seen_words{$w} and $seen_words{$w} > 1
|
|
990
|
0 |
489 |
if $debug
|
|
995
|
0 |
489 |
if $debug
|
|
999
|
0 |
489 |
if (length $output == 0)
|
|
1002
|
0 |
0 |
if (scalar @comps == 1)
|
|
1036
|
797 |
123 |
scalar @a_parts ? :
|
|
1062
|
250 |
234 |
if defined $self->{'set_district_alias'}{$ucc}
|
|
1068
|
11 |
223 |
if (defined $small_district{$ucc}) { }
|