Re: confused about DBD implementation of ChopBlanks

David Nicol <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Mon, Jan 3, 2011 at 8:56 AM, Martin J. Evans
> I did think of one spolier which I forgot to mention. Currently DBI allows
>
> prepare($sql, {ChopBlanks => 1});
>
> and ChopBlanks is ignored silently so if you wrote code which understood
> this and moved to another machine where DBI did not, it would be ignored
> silently but your code might not work as intended.

after reviewing the doc and seeing that prepare takes the \%attr I was
surprised that that doesn't do what you want.

does

  my $sth;
  {
    local $$dbh{ChopBlanks} = 1;
    $sth = $dbh->prepare($sql)
  };

work?



-- 
"For unknown reasons, Earth sped up in 1999" --Wikipedia on the Leap Second
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.