[Bast-commits] r7509 -
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Sep 3 18:24:16 GMT 2009
Author: ribasushi
Date: 2009-09-03 18:24:14 +0000 (Thu, 03 Sep 2009)
New Revision: 7509
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
Minor cleanups
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-09-03 18:12:53 UTC (rev 7508)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-09-03 18:24:14 UTC (rev 7509)
@@ -293,7 +293,7 @@
my $blob_cols = $self->_remove_blob_cols($source, $to_insert);
# insert+blob insert done atomically
- my $guard = $self->txn_scope_guard if %$blob_cols;
+ my $guard = $self->txn_scope_guard if $blob_cols;
my $need_last_insert_id = 0;
@@ -322,7 +322,7 @@
}
};
- $self->_insert_blobs($source, $blob_cols, $to_insert) if %$blob_cols;
+ $self->_insert_blobs($source, $blob_cols, $to_insert) if $blob_cols;
$guard->commit if $guard;
@@ -338,7 +338,7 @@
my $blob_cols = $self->_remove_blob_cols($source, $fields);
# update+blob update(s) done atomically
- my $guard = $self->txn_scope_guard if %$blob_cols;
+ my $guard = $self->txn_scope_guard if $blob_cols;
my @res;
if ($wantarray) {
@@ -351,9 +351,9 @@
$self->next::method(@_);
}
- $self->_update_blobs($source, $blob_cols, $where) if %$blob_cols;
+ $self->_update_blobs($source, $blob_cols, $where) if $blob_cols;
- $guard->commit if %$blob_cols;
+ $guard->commit if $guard;
return $wantarray ? @res : $res[0];
}
@@ -370,7 +370,7 @@
}
}
- return \%blob_cols;
+ return keys %blob_cols ? \%blob_cols : undef;
}
sub _update_blobs {
More information about the Bast-commits
mailing list