Tim,
A couple months back I posted to dbi-users asking if anyone
had the following error when using the below method for
connecting to the Database.
$ENV{DBI_AUTOPROXY} = 'dbi:Proxy:hostname=srv1;port=3333';
my $dbh = DBI->connect( "dbi:Oracle:sid", "user", "passwd",
{RaiseError => 1} ) or die $DBI::errstr;
Proxy.pm would complain that
that hostname was not defined. I debugged the code and
saw that the $dsn going into Proxy.pm as
dbi:Proxy:hostname=srv1;port=3333;dsn=dbi:Oracle:sid
..to fix this I put the line $dsn =~ s/dbi:Proxy://i;
in Proxy.pm and it worked. Yet I was the only one
that was having this problem. So I finally got tired
of changing Proxy.pm everytime I installed DBI and
RTFM for DBD::Proxy. When I tried the connect method,
DBI->connect("dbi:Proxy:hostname=srv1;port=3333;dsn=dbi:Oracle:sid"..etc
Proxy.pm recieves the dsn of
hostname=srv1;port=3333;dsn=dbi:Oracle:sid
..which it expects. I prefer setting the DBI_AUTOPROXY variable,
leaving my original connect alone. So my question is should
the patch involve fixing DBI.pm, the Proxy.pm fix I had done
already or either fix is okay?
Possible DBI fix,
if ($ENV{DBI_AUTOPROXY} && $driver ne 'Proxy' && $driver ne 'Switch') {
$dsn = "$ENV{DBI_AUTOPROXY};dsn=dbi:$driver:$dsn";
$dsn =~ s/dbi:proxy://i;
$driver = 'Proxy';
DBI->trace_msg(" DBI_AUTOPROXY: dbi:$driver:$dsn\n");
}
STH
----------------------------------
E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
Date: 11-Oct-01
Time: 16:59:27
----------------------------------