Author: timbo
Date: Thu Feb  9 02:56:00 2006
New Revision: 2492

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.pm
Log:
Fixed bind_columns to use set_err() instead of die() to report incorrect number
of parameters thanks to Ben Thul.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Thu Feb  9 02:56:00 2006
@@ -11,6 +11,8 @@ DBI::Changes - List of significant chang
   Fixed t/40profile.t to be insensitive to long double precision.
   Fixed for perl 5.8.0's more limited weaken() function.
   Fixed DBD::Proxy to not alter $@ in disconnect or AUTOLOADd methods.
+  Fixed bind_columns() to use return set_err(...) instead of die()
+    to report incorrect number of parameters, thanks to Ben Thul.
 
   Improved performance for thread-enabled perls thanks to Gisle Aas.
   Drivers can now use PERL_NO_GET_CONTEXT thanks to Gisle Aas.

Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Thu Feb  9 02:56:00 2006
@@ -1819,8 +1819,9 @@ sub _new_sth {    # called by DBD::<drivern
        my $attr;
        $attr = shift if !defined $_[0] or ref($_[0]) eq 'HASH';
 
-       die "bind_columns called with "[EMAIL PROTECTED]" refs when $fields 
needed."
+       return $sth->set_err(1, "bind_columns called with "[EMAIL PROTECTED]" 
refs when $fields needed")
            if @_ != $fields;
+
        my $idx = 0;
        $sth->bind_col(++$idx, shift, $attr) or return
            while (@_);

Reply via email to