Branch Coverage

blib/lib/WWW/Correios/SRO.pm
Criterion Covered Total %
branch 20 50 40.0


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 sro_ok($code)
302 0 0 if ($params->{'verifica_prefixo'})
304 0 0 unless defined $prefixo
308 0 0 unless ($agent)
312 0 0 exists $params->{'timeout'} ? :
316 0 0 wantarray ? :
328 0 0 unless $response->is_success
331 0 0 $results eq 'T' ? :
336 0 1 unless $content =~ m[(.+)]is
352 51 7 if index($event, '<') < 0
364 0 5 unless $data and ref $data and ref $data eq 'ARRAY' || ref $data eq 'HASH'
367 0 5 ref $data eq 'ARRAY' ? :
368 0 5 unless $last
371 0 5 if (not ref $last or ref $last ne 'HASH' or not exists $last->{'tipo'} or not exists $last->{'status'})
377 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) { }
379 1 4 if $status <= 1
382 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
388 1 2 if $status == 54 or $status == 2
391 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