Branch Coverage

blib/lib/SQL/Translator.pm
Criterion Covered Total %
branch 87 114 76.3


line true false branch
73 0 10 @_ > 1 && ($_[1] xor $_[0]->quote_identifiers) ? :
79 0 10 @_ > 1 && ($_[1] xor $_[0]->quote_identifiers) ? :
222 50 4 if (my $filename = $self->filename)
227 0 50 ref $filename eq 'ARRAY' ? :
230 0 50 unless open my $fh, "<", $file
235 0 50 unless close $fh
266 49 68 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 68 if @_ % 2
317 20 97 if (my $filename = $args->{'filename'} || $args->{'file'})
321 37 80 if (my $data = $args->{'data'} || $args->{'datasource'})
333 33 84 if ($parser = $args->{'parser'} || $args->{'from'})
342 42 75 if ($producer = $args->{'producer'} || $args->{'to'})
357 82 35 unless ($self->_has_schema)
359 2 80 if ($@ or not $parser_output)
360 0 2 $@ ? :
365 0 115 if $self->debugging
368 0 115 if ($self->validate)
370 0 0 unless $schema->is_valid
380 0 10 if $err
385 10 105 wantarray ? :
387 10 105 if ($wantarray) { }
393 0 115 if ($@ or not $producer_output || @producer_output)
399 10 105 wantarray ? :
424 3 204 if (@_)
428 0 3 unless (defined $_[0])
433 1 2 &isa($_[0], 'HASH') ? :
452 508 373 unless @_
459 220 153 if (&isa($tool, 'CODE')) { }
470 152 1 unless $tool =~ /::/
473 1 152 unless ($code)
474 1 0 if ('SQL::Translator'->error =~ /Can't find module/) { }
476 1 0 unless $code
477 0 1 unless $code
488 0 153 $sub eq 'CODE' ? :
497 1 372 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 33 134 if $name =~ /::/
579 159 8 if @_
582 158 33 $_ ? :
585 129 62 if $INC{$file}
588 25 37 if $@ =~ /Can't locate $file in \@INC/
589 37 0 unless $@
590 0 37 if $@ and not $@ =~ /"SQL::Translator::Producer" is not exported/
609 158 1 if (my $module = load($module, @path))
611 153 5 wantarray ? :
643 12 12 if (ref $args[0] eq 'CODE') { }
4 8 elsif (not exists $self->{$field}) { }
650 16 8 @args ? :