Branch Coverage

blib/lib/Siffra/Tools.pm
Criterion Covered Total %
branch 2 84 2.3


line true false branch
121 0 1 if ${^GLOBAL_PHASE} eq 'DESTRUCT'
123 1 0 if (&blessed($self) and $self->isa('Siffra::Tools')) { }
143 0 0 if (%parameters) { }
0 0 elsif (defined $self->{'configurations'}{'database'}) { }
168 0 0 if ($driverConnection) { }
176 0 0 unless my($scheme, $driver, $attr_string, $attr_hash, $driver_dsn) = 'DBI'->parse_dsn($dsn)
182 0 0 if ($@)
204 0 0 unless (defined $self->{'database'}{'connection'})
209 0 0 unless my $rc = $self->{'database'}{'connection'}->begin_work
219 0 0 unless (defined $self->{'database'}{'connection'})
224 0 0 unless my $rc = $self->{'database'}{'connection'}->commit
234 0 0 unless (defined $self->{'database'}{'connection'})
239 0 0 unless my $rc = $self->{'database'}{'connection'}->rollback
251 0 0 unless my $sth = $self->{'database'}{'connection'}->prepare($sql)
263 0 0 unless my $sth = $self->{'database'}{'connection'}->do($sql)
275 0 0 unless defined $self->{'database'}{'connection'}
278 0 0 unless my $res = $sth->execute
311 0 0 unless -e $file
316 0 0 if ($@)
322 0 0 if (open my $fh, $file) { }
351 0 0 unless ($file and -e $file)
360 0 0 unless open FH, '<:encoding(UTF-8)', $file
369 0 0 unless ($layout->{$tipo_de_registro})
384 0 0 if ($tamanho_da_linha_no_arquivo != $tamanho_da_linha_no_layout)
403 0 0 if ($field->{'match'}) { }
0 0 elsif ($out and not $out =~ /\$/u) { }
405 0 0 unless ($$auxiliar{$field->{'field'}} =~ /$field->{'match'}/u)
415 0 0 if ($out)
451 0 0 if ($@)
475 0 0 if ($@) { }
487 0 0 $_ =~ /^\s+$/u ? :
0 0 defined $_ ? :
498 0 0 unless open my $fh, "<:encoding($encoding)", $file
510 0 0 $encoding =~ /utf-8/iu ? :
514 0 0 if ($errorCode > 0)
523 0 0 if ($originalHeader)
525 0 0 if (not $self->validaHeader('originalHeader', $originalHeader, 'header', \@header)) { }
546 0 0 if ($errorCode > 0 and $errorCode != 2012) { }
549 0 0 if ($errorMessage =~ /Inconsistent number of fields/iu)
580 0 0 $originalHeaderString eq $headerString ? :
592 0 0 $arCorreios =~ /^([a-zA-Z]{2})(\d{9})([a-zA-Z]{2})$/u ? :
604 0 0 if ($@)