From: Brandon L. Black Date: Tue, 3 Oct 2006 20:25:03 +0000 (+0000) Subject: make insert_bulk use the sth method in the newer style of things X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=894328b896435b7b8d8a37500750f37a40bcbb2f;p=dbsrgits%2FDBIx-Class-Historic.git make insert_bulk use the sth method in the newer style of things --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 14a6236..edeb8d0 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -862,13 +862,8 @@ sub insert_bulk { my @debug_bind = map { defined $_ ? qq{'$_'} : q{'NULL'} } @bind; $self->debugobj->query_start($sql, @debug_bind); } - my $sth = eval { $self->sth($sql,'insert') }; + my $sth = $self->sth($sql); - if (!$sth || $@) { - $self->throw_exception( - 'no sth generated via sql (' . ($@ || $self->_dbh->errstr) . "): $sql" - ); - } # @bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args my $rv;