Branch Coverage

blib/lib/WWW/Correios/SRO.pm
Criterion Covered Total %
branch 24 66 36.3


line true false branch
263 11 8 if ($_[0] =~ /^[A-Z|a-z]{2}([0-9]{8})([0-9])BR$/i) { }
274 0 11 $resto == 1 ? :
0 11 $resto == 0 ? :
286 4 4 if (sro_ok(@_)) { }
300 0 0 unless $code and length($code) % 13 == 0
302 0 0 if not @codes or @codes > 1 and not $params->{'multiple'}
305 0 0 unless sro_ok($code_to_check)
307 0 0 if ($params->{'verifica_prefixo'})
309 0 0 unless defined $prefixo
314 0 0 unless ($agent)
318 0 0 exists $params->{'timeout'} ? :
322 0 0 wantarray ? :
334 0 0 unless $response->is_success
337 0 0 if (ref $data eq 'HASH')
338 0 0 unless ($params->{'multiple'})
342 0 0 if ($results eq 'U')
349 0 0 $results eq 'T' ? :
354 0 2 unless index($content, '') >= 0
360 3 0 if ($object =~ m[([^>]+)])
363 0 3 unless $tracking
372 1 1 keys %data == 1 ? :
378 75 10 if index($event, '<') < 0
390 0 5 unless $data and ref $data and ref $data eq 'ARRAY' || ref $data eq 'HASH'
393 0 5 ref $data eq 'ARRAY' ? :
394 0 5 unless $last
397 0 5 if (not ref $last or ref $last ne 'HASH' or not exists $last->{'tipo'} or not exists $last->{'status'})
403 5 0 if ($tipo eq 'BDR' or $tipo eq 'BDE' or $tipo eq 'BDI') { }
0 0 elsif ($tipo eq 'FC' and $status == 1) { }
0 0 elsif ($tipo eq 'LDI' and $status <= 3 || $status == 14 or $tipo eq 'OEC' and $status == 0) { }
405 1 4 if $status <= 1
408 0 3 if $status == 9 or $status == 12 or $status == 28 or $status == 37 or $status == 43 or $status == 50 or $status == 51 or $status == 52 or $status == 80
414 1 2 if $status == 54 or $status == 2
417 0 1 if $status != 20 and $status != 7 and $status <= 21 or $status == 26 or $status == 33 or $status == 36 or $status == 40 or $status == 42 or $status == 48 or $status == 49 or $status == 56