Dear monks
I'm writing a little Internet application that uses Class::DBI as principle method to access the MySQL database. For this application i use universal unique identifiers, commonly known as guid or uuid's
During testing phase, one of the more elaborate test scripts sometimes generated errors. During investigation it came to me that, when a generated uuid has by coincidence a trailing space as bit presentation, the database would chop it off.
After correcting the database type to a TINYBLOB, the database left the trailing space an kept the guids correctly, but in my perl code the trailing space was still missing.
Reading through the cpan docs of class:dbi i noticed that they set the option 'ChopBlanks' by default on. Further according the doc of DBI, this option should only affect char attributes in the database. My type of attribute is TINYBLOB
_However_, overwriting the option 'ChopBlanks' back to zero solved my problem.
Googling about the option got me only a remark that 'ChopBlanks => 1' set by Class::DBI was maybe a legacy setting and could be ignored. But an annotation in the POD documentation says that what i'm doing is earning a ticket to hell.
So my dear monks, my question to you is:
Thanks in advance
In reply to Class::DBI and the ChopBlanks option by martell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |