Branch Coverage

blib/lib/Data/Validate/Sanctions/Fetcher.pm
Criterion Covered Total %
branch 71 100 71.0


line true false branch
56 1 7 unless $eu_token or $eu_url
58 2 6 if ($eu_token)
100 0 7 unless unzip(\$raw_data, \$output)
107 56 4895 if $date =~ m[^(\d{1,2})[/\-](\d{1,2})[/\-](\d{4})$]
122 112 10748 code2country($value) ? :
177 0 6327 unless $dob
181 161 6166 if ($dob =~ /^(\d{1,2})-(\d{1,2})-(\d{4})$/) { }
0 6166 elsif ($dob =~ /^(\d{4})-(\d0{1,2})-(\d{1,2})$/) { }
182 119 42 if $1 == 0 or $2 == 0
184 0 0 if $2 == 0 or $3 == 0
186 77 6250 if $dob =~ /^[A-Z][a-z]{2}-(\d{4})$/
188 1223 5104 if ($dob =~ /^\d{4}$/) { }
185 4919 elsif ($dob =~ /(\d{4}).*to.*(\d{4})$/) { }
194 4830 89 defined $epoch ? :
216 5697 56809 if $_ eq "dob_epoch"
223 5697 0 if $data{'names'}
234 14 0 $ref->{'publshInformation'}{'Publish_Date'} =~ m[(\d{1,2})/(\d{1,2})/(\d{4})] ? :
237 0 14 unless defined $publish_epoch
243 15179 17869 if ref $node eq "HASH"
251 5526 5508 unless $entry->{'sdnType'} eq "Individual"
256 12840 1760 if $category eq "strong"
276 1774 3734 if ref $id_list eq "HASH"
277 1738 6440 $_->{'idType'} eq 'Passport' ? :
278 606 7572 $_->{'idType'} =~ /National ID/ ? :
304 0 7 unless my $csv = "Text::CSV"->new({"binary", 1})
309 7 0 $parsed ? :
310 0 7 unless @info and _date_to_epoch($info[1])
313 0 7 unless defined $publish_epoch
323 0 161 unless $parsed
329 0 161 unless $row[$column{'Group Type'}] eq "Individual"
332 0 161 if $name =~ /^\s*$/
345 161 0 if defined $column{'Passport Number'}
346 161 0 if defined $column{'Name Non-Latin Script'}
348 35 126 $non_latin_alias ? :
0 161 $passport_no ? :
373 0 28 unless $entry->{'subjectType'}{'-code'} eq "person"
377 24 88 if ref $entry->{$_} eq "HASH"
383 0 60 unless $name
384 60 0 if $name ne " "
389 16 20 if $dob->{'-birthdate'}
390 20 0 if not $dob->{'-birthdate'} and $dob->{'-year'}
393 0 36 unless $_->{'-countryIso2Code'}
394 0 12 unless $_->{'-countryIso2Code'}
395 0 8 unless $_->{'-countryIso2Code'}
396 8 0 unless $_->{'-zipCode'} or $_->{'-poBox'}
397 0 12 unless $_->{'-countryIso2Code'}
398 4 8 $_->{'-identificationTypeCode'} eq 'id' ? :
399 8 4 $_->{'-identificationTypeCode'} eq 'passport' ? :
418 0 4 unless $publish_epoch
483 0 23 unless open my $fh, "<", "$1"