X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase%2FASE.pm;h=c90af2fffb72be7a8bc592fddff7b49237fa74e7;hb=cca282b601b57a8de658986fc3f0d789a72749ea;hp=d2f5e2f843b1eb719af9aa97751c9999ab2db8ca;hpb=e366f8071f0797f739114539858e59bd3aea3baa;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm index d2f5e2f..c90af2f 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm @@ -436,8 +436,6 @@ sub update { my $self = shift; my ($source, $fields, $where, @rest) = @_; - my $wantarray = wantarray; - my $blob_cols = $self->_remove_blob_cols($source, $fields); my $table = $source->name; @@ -475,10 +473,10 @@ sub update { my @res; if (%$fields) { - if ($wantarray) { + if (wantarray) { @res = $self->next::method(@_); } - elsif (defined $wantarray) { + elsif (defined wantarray) { $res[0] = $self->next::method(@_); } else { @@ -488,7 +486,7 @@ sub update { $guard->commit; - return $wantarray ? @res : $res[0]; + return wantarray ? @res : $res[0]; } sub insert_bulk { @@ -659,15 +657,12 @@ EOF DBD::Sybase::set_cslib_cb($orig_cslib_cb); if ($exception =~ /-Y option/) { - carp <<"EOF"; - -Sybase bulk API operation failed due to character set incompatibility, reverting -to regular array inserts: + my $w = 'Sybase bulk API operation failed due to character set incompatibility, ' + . 'reverting to regular array inserts. Try unsetting the LANG environment variable' + ; + $w .= "\n$exception" if $self->debug; + carp $w; -*** Try unsetting the LANG environment variable. - -$exception -EOF $self->_bulk_storage(undef); unshift @_, $self; goto \&insert_bulk;