# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
-$VERSION = '0.07002';
+$VERSION = '0.07999_01';
sub MODIFY_CODE_ATTRIBUTES {
- my ($class,$code,@attrs) = @_;
- $class->mk_classdata('__attr_cache' => {})
- unless $class->can('__attr_cache');
- $class->__attr_cache->{$code} = [@attrs];
- return ();
+ my ($class,$code,@attrs) = @_;
+ $class->mk_classdata('__attr_cache' => {})
+ unless $class->can('__attr_cache');
+ $class->__attr_cache->{$code} = [@attrs];
+ return ();
}
sub _attr_cache {
=cut
-sub _execute {
- my ($self, $op, $extra_bind, $ident, @args) = @_;
- my ($sql, @bind) = $self->sql_maker->$op($ident, @args);
- unshift(@bind, @$extra_bind) if $extra_bind;
- if ($self->debug) {
- my @debug_bind = map { defined $_ ? qq{'$_'} : q{'NULL'} } @bind;
- $self->debugobj->query_start($sql, @debug_bind);
- }
-
- $sql =~ s/\?/shift(@bind)/eg;
-
- my $sth = eval { $self->sth($sql,$op) };
-
- if (!$sth || $@) {
- $self->throw_exception(
- 'no sth generated via sql (' . ($@ || $self->_dbh->errstr) . "): $sql"
- );
- }
-
- my $rv;
- if ($sth) {
- my $time = time();
- $rv = eval { $sth->execute };
-
- if ($@ || !$rv) {
- $self->throw_exception("Error executing '$sql': ".($@ || $sth->errstr));
- }
- } else {
- $self->throw_exception("'$sql' did not generate a statement.");
- }
- if ($self->debug) {
- my @debug_bind = map { defined $_ ? qq{`$_'} : q{`NULL'} } @bind;
- $self->debugobj->query_end($sql, @debug_bind);
- }
- return (wantarray ? ($rv, $sth, @bind) : $rv);
+sub _prep_for_execute {
+ my $self = shift;
+ my ($sql, @bind) = $self->next::method(@_);
+
- $sql =~ s/\?/$self->_dbh->quote($_)/e for (@bind);
++ $sql =~ s/\?/$self->_dbh->quote(shift(@bind))/eg;
+
+ return ($sql);
}
=head1 AUTHORS