Branch Coverage

blib/lib/Siffra/Tools.pm
Criterion Covered Total %
branch 2 92 2.1


line true false branch
124 0 1 if ${^GLOBAL_PHASE} eq 'DESTRUCT'
126 1 0 if (&blessed($self) and $self->isa('Siffra::Tools')) { }
146 0 0 if (%parameters) { }
0 0 elsif (defined $self->{'configurations'}{'database'}) { }
171 0 0 if ($driverConnection) { }
179 0 0 unless my($scheme, $driver, $attr_string, $attr_hash, $driver_dsn) = 'DBI'->parse_dsn($dsn)
185 0 0 if ($@)
207 0 0 unless (defined $self->{'database'}{'connection'})
212 0 0 unless my $rc = $self->{'database'}{'connection'}->begin_work
222 0 0 unless (defined $self->{'database'}{'connection'})
227 0 0 unless my $rc = $self->{'database'}{'connection'}->commit
237 0 0 unless (defined $self->{'database'}{'connection'})
242 0 0 unless my $rc = $self->{'database'}{'connection'}->rollback
254 0 0 unless my $sth = $self->{'database'}{'connection'}->prepare($sql)
266 0 0 unless my $sth = $self->{'database'}{'connection'}->do($sql)
278 0 0 unless defined $self->{'database'}{'connection'}
281 0 0 unless my $res = $sth->execute
314 0 0 unless -e $file
319 0 0 if ($@)
325 0 0 if (open my $fh, $file) { }
354 0 0 unless ($file and -e $file)
366 0 0 if ($mime->{'MT_type'} =~ m[application/zip]u) { }
369 0 0 unless $fh = 'IO::Uncompress::Unzip'->new($file)
378 0 0 unless open $fh, '<:encoding(UTF-8)', $file
391 0 0 unless ($layout->{$tipo_de_registro})
406 0 0 if ($tamanho_da_linha_no_arquivo != $tamanho_da_linha_no_layout)
425 0 0 if ($field->{'match'}) { }
0 0 elsif ($out and not $out =~ /\$/u) { }
427 0 0 unless ($$auxiliar{$field->{'field'}} =~ /$field->{'match'}/u)
437 0 0 if ($out)
473 0 0 if ($@)
497 0 0 if ($@) { }
509 0 0 $_ =~ /^\s+$/u ? :
0 0 defined $_ ? :
524 0 0 if ($mime->{'MT_type'} =~ m[application/zip]u) { }
527 0 0 unless $fh = 'IO::Uncompress::Unzip'->new($file)
536 0 0 unless open $fh, "<:encoding($encoding)", $file
549 0 0 $encoding =~ /utf-8/iu ? :
553 0 0 if ($errorCode > 0)
562 0 0 if ($originalHeader)
564 0 0 if (not $self->validaHeader('originalHeader', $originalHeader, 'header', \@header)) { }
589 0 0 if ($errorCode > 0 and $errorCode != 2012) { }
592 0 0 if ($errorMessage =~ /Inconsistent number of fields/iu)
623 0 0 $originalHeaderString eq $headerString ? :
635 0 0 $arCorreios =~ /^([a-zA-Z]{2})(\d{9})([a-zA-Z]{2})$/u ? :
647 0 0 if ($@)