On Tue, Sep 10, 2002 at 08:16:24PM -0400, Steven N. Hirsch wrote:
> On Tue, 10 Sep 2002, Tim Bunce wrote:
>
> > or Carp::croak("Can't connect(@_), no database driver specified "
> > ."and DBI_DSN env var not set");
> >
> > ! if ($ENV{DBI_AUTOPROXY} && $driver ne 'Proxy' && $driver ne 'Sponge' &&
>$driver ne 'Switch') {
> > $driver = 'Proxy';
> > ! if ($ENV{DBI_AUTOPROXY} =~ s/^dbi:(\w*?)(?:\((.*?)\))?://i) {
> > ! $driver = $1;
> > ! $driver_attrib_spec = ($driver_attrib_spec) ? "$driver_attrib_spec,$2" :
>$2;
> > ! }
> > ! $dsn = "$ENV{DBI_AUTOPROXY};dsn=dbi:$driver:$dsn";
> > ! DBI->trace_msg(" DBI_AUTOPROXY:
>dbi:$driver($driver_attrib_spec):$dsn\n");
> > }
>
> Tim,
>
> You are concatenating attributes which we know to be for the Proxy driver
> to any existing attributes. However, if the user is setting up the
> environment for autoproxy, isn't it more likely that the application is
> unmodified and latter were truly intended for the remote database?
>
> Perhaps they should become arguments to the remote database dsn instead?
They'll apply to both. I figure the attributes set via DBI_AUTOPROXY
will almost always be 'proxy_...' and thus be ignored at the remote end.
Tim.
p.s. Thanks for your patch to fixup my original vesion of that patch.