croak($msg);
}
-=head1 NAME
+=head1 NAME
DBIx::Class::Storage::DBI - DBI storage handler
$self->dbh->commit unless $self->dbh->{AutoCommit};
}
else {
- $self->dbh->commit if --$self->{transaction_depth} == 0;
+ $self->dbh->commit if --$self->{transaction_depth} == 0;
}
}
$self->throw_exception("no sth generated via sql: $sql") unless $sth;
@bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args
my $rv;
- if ($sth) {
+ if ($sth) {
$rv = $sth->execute(@bind)
or $self->throw_exception("Error executing '$sql': " . $sth->errstr);
- } else {
+ } else {
$self->throw_exception("'$sql' did not generate a statement.");
}
return (wantarray ? ($rv, $sth, @bind) : $rv);
eval "use SQL::Translator";
$self->throw_exception("Can't deploy without SQL::Translator: $@") if $@;
eval "use SQL::Translator::Parser::DBIx::Class;";
- $self->throw_exception($@) if $@;
+ $self->throw_exception($@) if $@;
eval "use SQL::Translator::Producer::${type};";
$self->throw_exception($@) if $@;
my $tr = SQL::Translator->new(%$sqltargs);
foreach(split(";\n", @statements)) {
$self->debugfh->print("$_\n") if $self->debug;
$self->dbh->do($_) or warn "SQL was:\n $_";
- }
+ }
}
sub DESTROY { shift->disconnect }