[CDBI] ChopBlanks=>0

Ryan Gerry ryan at livetext.com
Mon Mar 13 21:13:57 GMT 2006


I was wondering if anyone knows why Class::DBI requires the DBI 
connection attribute ChopBlanks?  According to the DBI documentation 
this attribute:

ChopBlanks (boolean, inherited)

     The ChopBlanks attribute can be used to control the trimming of 
trailing space characters from fixed width character (CHAR) fields. No 
other field types are affected, even where field values have trailing 
spaces.

     The default is false (although it is possible that the default may 
change). Applications that need specific behavior should set the 
attribute as needed.

     Drivers are not required to support this attribute, but any driver 
which does not support it must arrange to return undef as the attribute 
value.

And according to the DBD::mysql documentation, ChopBanks trims trailing 
AND leading whitespace.

Does anyone know thy this attribute would be required?  My existng 
application depends on some blanks being inserted so this would cause 
problems for me.  I also wanted to reuse the same database hanlde as my 
legacy code.

Thanks,
Ryan Gerry




More information about the ClassDBI mailing list