Branch Coverage

blib/lib/SQL/Translator.pm
Criterion Covered Total %
branch 81 114 71.0


line true false branch
73 0 7 @_ > 1 && ($_[1] xor $_[0]->quote_identifiers) ? :
79 0 7 @_ > 1 && ($_[1] xor $_[0]->quote_identifiers) ? :
222 35 4 if (my $filename = $self->filename)
227 0 35 ref $filename eq 'ARRAY' ? :
230 0 35 unless open my $fh, "<", $file
235 0 35 unless close $fh
266 49 45 if (@_ == 1) { }
268 0 49 if (&isa($_[0], 'HASH')) { }
0 49 elsif (&isa($_[0], 'GLOB')) { }
16 33 elsif (&isa($_[0], 'SCALAR')) { }
33 0 elsif (not ref $_[0]) { }
302 0 0 unless $self->data and $self->producer and $self->parser
309 0 45 if @_ % 2
317 4 90 if (my $filename = $args->{'filename'} || $args->{'file'})
321 33 61 if (my $data = $args->{'data'} || $args->{'datasource'})
333 16 78 if ($parser = $args->{'parser'} || $args->{'from'})
342 24 70 if ($producer = $args->{'producer'} || $args->{'to'})
357 65 29 unless ($self->_has_schema)
359 2 63 if ($@ or not $parser_output)
360 0 2 $@ ? :
365 0 92 if $self->debugging
368 0 92 if ($self->validate)
370 0 0 unless $schema->is_valid
380 0 10 if $err
385 5 87 wantarray ? :
387 5 87 if ($wantarray) { }
393 0 92 if ($@ or not $producer_output || @producer_output)
399 5 87 wantarray ? :
424 3 187 if (@_)
428 0 3 unless (defined $_[0])
433 1 2 &isa($_[0], 'HASH') ? :
452 442 314 unless @_
459 198 116 if (&isa($tool, 'CODE')) { }
470 116 0 unless $tool =~ /::/
473 0 116 unless ($code)
474 0 0 if ('SQL::Translator'->error =~ /Can't find module/) { }
476 0 0 unless $code
477 0 0 unless $code
488 0 116 $sub eq 'CODE' ? :
497 1 313 if @_
514 0 8 unless load("SQL::Translator::$uctype")
520 64 24 unless -d $dir
532 576 96 if (-f $_ and /\.pm$/)
541 576 0 if ($cur_dir =~ /$base_dir(.*)/) { }
550 360 792 unless $_
578 15 114 if $name =~ /::/
579 121 8 if @_
582 121 15 $_ ? :
585 95 41 if $INC{$file}
588 7 34 if $@ =~ /Can't locate $file in \@INC/
589 34 0 unless $@
590 0 34 if $@ and not $@ =~ /"SQL::Translator::Producer" is not exported/
609 121 0 if (my $module = load($module, @path))
611 116 5 wantarray ? :
643 12 12 if (ref $args[0] eq 'CODE') { }
4 8 elsif (not exists $self->{$field}) { }
650 16 8 @args ? :