Re: Strange bind_param issue

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Wed, Aug 15, 2012 at 06:02:35PM +0100, Charles Jardine wrote:
> 
> $obj is not a string. It is an object of a class which has a
> stringify operator. "$obj" is a string, because "..." stringifies.
> 
> It is not at all clear how the DBI should take a copy of an object.

Without any method attributes in the bind_param call the driver is free
to 'do something reasonable' which typically means treat the value as a
string (or a number if it knows the field is numric).

> I think this is a case of user error.

It would be reasonable for a driver to complain if passed an object that
doesn't have string/numeric overloading, but this one does.

Tim.
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.