On 12-nov-03, at 14:27, Tim Bunce wrote:
[..]if i tell DBI to connect to a postgres db, but i don't have DBD::Pg
installed, it will not give me a warning of any kind, including when
DBI->trace(5) is set, that
i do not have the necessary driver installed. It simply silently fails.
Works for me:
$ perl -MDBI -e 'DBI->connect("dbi:Pg:foo",1,1)'
It would be a *big* help if you could post a test case, like I have used
above, that demonstrates the problem.
sorry about that, i also thought i attached the log, but apparently i didn't.
Here's the test case:
$ perl -MDBI -le 'DBI->trace(5);eval{$d=DBI->connect("dbi:Pg:foo",1,1)};print $DBI::errstr if !$d;'
DBI 1.38-ithread dispatch trace level set to 5
Note: perl is running without the recommended perl -w option
-> DBI->connect(dbi:Pg:foo, 1, ****)
-> DBI->install_driver(Pg) for linux perl=5.008002 pid=12789 ruid=1001 euid=1001
-> $DBI::errstr (&) FETCH from lasth=none
Can't read $DBI::errstr, last handle unknown or destroyed at -e line 1.
<- $DBI::errstr= undef
-- DBI::END
Apparently, the error is only in $@, and not $DBI::errstr, which in itself may not be a bug, just slightly surprising on my end.
The complaining about $DBI::errstr only seems to occur if i use trace and set the tracelevel to 2 or higher.
--
Jos Boumans
"You know you are never more indignant in life than when you're
shopping at a store you feel is beneath you and one of the other
customers mistakes you for one of the employees of that store."
- Dennis MillerCPANPLUS http://cpanplus.sf.net
