Branch Coverage

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


line true false branch
292 11 8 if ($_[0] =~ /^[A-Z|a-z]{2}([0-9]{8})([0-9])BR$/i) { }
303 0 11 $resto == 1 ? :
0 11 $resto == 0 ? :
315 4 4 if (sro_ok(@_)) { }
329 0 0 unless $code and length($code) % 13 == 0
331 0 0 if not @codes or @codes > 1 and not $params->{'multiple'}
334 0 0 unless sro_ok($code_to_check)
336 0 0 if ($params->{'verifica_prefixo'})
338 0 0 unless defined $prefixo
343 0 0 unless ($agent)
347 0 0 exists $params->{'timeout'} ? :
351 0 0 wantarray ? :
363 0 0 unless $response->is_success
366 0 0 if (ref $data eq 'HASH')
367 0 0 unless ($params->{'multiple'})
371 0 0 if ($results eq 'U')
378 0 0 $results eq 'T' ? :
383 0 2 unless index($content, '') >= 0
389 3 0 if ($object =~ m[([^>]+)])
392 0 3 unless $tracking
401 1 1 keys %data == 1 ? :
407 75 10 if index($event, '<') < 0
419 0 5 unless $data and ref $data and ref $data eq 'ARRAY' || ref $data eq 'HASH'
422 0 5 ref $data eq 'ARRAY' ? :
423 0 5 unless $last
426 0 5 if (not ref $last or ref $last ne 'HASH' or not exists $last->{'tipo'} or not exists $last->{'status'})
432 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) { }
434 1 4 if $status <= 1
437 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
443 1 2 if $status == 54 or $status == 2
446 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