[svn:dbi] r14195 - dbi/trunk/lib/DBI/DBD

[email protected]
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: hmbrand
Date: Tue Jun 29 01:28:47 2010
New Revision: 14195

Modified:
   dbi/trunk/lib/DBI/DBD/SqlEngine.pm

Log:
->{ChopBlanks} should *only* strip spaces, not other \s

Modified: dbi/trunk/lib/DBI/DBD/SqlEngine.pm
==============================================================================
--- dbi/trunk/lib/DBI/DBD/SqlEngine.pm	(original)
+++ dbi/trunk/lib/DBI/DBD/SqlEngine.pm	Tue Jun 29 01:28:47 2010
@@ -768,9 +768,9 @@
         $sth->finish;
         return;
     }
-    if ( $sth->FETCH("ChopBlanks") )
-    {
-        $_ && $_ =~ s/\s+$// for @$dav;
+    if ( $sth->FETCH("ChopBlanks") )	# XXX: (TODO) Only chop on CHAR fields,
+    {					# not on VARCHAR or NUMERIC (see DBI docs)
+        $_ && $_ =~ s/ +$// for @$dav;
     }
     return $sth->_set_fbav($dav);
 }    # fetch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.