Author: timbo
Date: Mon Jun 28 15:23:51 2004
New Revision: 371

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.pm
   dbi/trunk/META.yml
Log:
Pass \%attr from (old-style) bind_columns call down to bind_col()
Update META.yml
Tweak Changes.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Mon Jun 28 15:23:51 2004
@@ -6,9 +6,6 @@
 
 =head1 CHANGES in DBI 1.43 (svn rev XXX),    XXth XXX 2004
 
-Extended bind_col() TYPE attribute specification to imply
-standard formating of value, eg SQL_DATE implies 'YYYY-MM-DD'.
-
   Fixed connect() and connect_cached() RaiseError/PrintError
     which would sometimes show "(no error string)" as the error.
   Fixed compiler warning thanks to Paul Marquess.

Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Mon Jun 28 15:23:51 2004
@@ -1695,19 +1695,18 @@
        my $sth = shift;
        my $fields = $sth->FETCH('NUM_OF_FIELDS') || 0;
        if ($fields <= 0 && !$sth->{Active}) {
-           # XXX ought to be set_err
-           die "Statement has no result columns to bind"
-               ." (perhaps you need to successfully call execute first)";
+           return $sth->set_err(1, "Statement has no result columns to bind"
+                   ." (perhaps you need to successfully call execute first)");
        }
        # Backwards compatibility for old-style call with attribute hash
        # ref as first arg. Skip arg if undef or a hash ref.
-       my $attr = $_[0]; # maybe
-       shift if !defined $attr or ref($attr) eq 'HASH';
+       my $attr;
+       $attr = shift if !defined $_[0] or ref($_[0]) eq 'HASH';
 
        die "bind_columns called with "[EMAIL PROTECTED]" refs when $fields needed."
            if @_ != $fields;
        my $idx = 0;
-       $sth->bind_col(++$idx, shift) or return
+       $sth->bind_col(++$idx, shift, $attr) or return
            while (@_);
        return 1;
     }
@@ -5382,7 +5381,7 @@
 memory location as the corresponding column value.  This makes using
 bound variables very efficient. Multiple variables can be bound
 to a single column, but there's rarely any point. Binding a tied
-variable doesn't work.
+variable doesn't work, currently.
 
 The L</bind_param> method
 performs a similar, but opposite, function for input variables.

Modified: dbi/trunk/META.yml
==============================================================================
--- dbi/trunk/META.yml  (original)
+++ dbi/trunk/META.yml  Mon Jun 28 15:23:51 2004
@@ -1,10 +1,11 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         DBI
-version:      1.41
+version:      1.43
 version_from: DBI.pm
 installdirs:  site
 requires:
+    Test::More:                    0.4
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21
+generated_by: ExtUtils::MakeMaker version 6.16

Reply via email to