|
|
sybperl-l Archive
Up Prev Next
From: kimball at stsci dot edu (Timothy Kimball)
Subject: DBD-Sybase-0.04 interaction with Apache::DBI
Date: Oct 10 1997 1:01PM
Trying to run DBD-Sybase-0.04 under Apache-DBI-0.74 gives fatal errors:
[Fri Oct 10 08:35:26 1997] Can't use string ("") as a HASH ref while "strict refs" in use at /faxafloi/data1/lib/perl5/site_perl/DBD/Sybase.pm line 63.
What's happening is that Apache::DBI::connect() has this line in it:
my @args = map { defined $_ ? $_ : "" } @_;
So arguments that aren't defined get defined as empty scalars,
including the (optional) fourth argument \%attr. These arguments get
passed to DBD-Sybase where $attr->{AutoCommit} is tested, and *poof*!
This looks like something that will ultimately need to be fixed in
Apache::DBI, because it appears to violate the usage of connect() in
the DBI documentation, but for now, workarounds appear to be:
* Always include the fourth argument ( at least, {} )
* Add "$attr ||= {};" just before line 63 in DBD::Sybperl.
Other than that, looks pretty good. Now let's see about BLOBs. :)
--
Tim Kimball · Data Systems Division ¦ kimball@stsci.edu · 410-338-4417
Space Telescope Science Institute ¦ http://www.stsci.edu/~kimball/
3700 San Martin Drive ¦ http://archive.stsci.edu/
Baltimore MD 21218 USA ¦ http://faxafloi.stsci.edu:4547/
|