On Tue, 10 Sep 2002, Tim Bunce wrote:

> > Can you grant r/o access to CVS or the like?
> 
> It's crossed my mind from time to time to go the sourceforge kind'a route
> but it's never quite happened.
> 
> Tim.

Tim,

I'm sure this was a slip of the fingers, but the final dsn string must use
the "real" driver name (applies after your patch below):

--- DBI.pm.orig Tue Sep 10 19:50:19 2002
+++ DBI.pm      Tue Sep 10 20:01:32 2002
@@ -472,12 +472,13 @@
                ."and DBI_DSN env var not set");
 
     if ($ENV{DBI_AUTOPROXY} && $driver ne 'Proxy' && $driver ne 'Sponge' && $driver 
ne 'Switch') {
-       $driver = 'Proxy';
+       my $proxy = 'Proxy';
        if ($ENV{DBI_AUTOPROXY} =~ s/^dbi:(\w*?)(?:\((.*?)\))?://i) {
-           $driver = $1;
+           $proxy = $1;
            $driver_attrib_spec = ($driver_attrib_spec) ? "$driver_attrib_spec,$2" : 
$2;
        }
        $dsn = "$ENV{DBI_AUTOPROXY};dsn=dbi:$driver:$dsn";
+       $driver = $proxy;
        DBI->trace_msg("       DBI_AUTOPROXY: 
dbi:$driver($driver_attrib_spec):$dsn\n");
     }
 

Steve


> 
> *** DBI.pm    2002/07/18 14:23:44     11.18
> --- DBI.pm    2002/09/10 10:57:43
> ***************
> *** 471,480 ****
>       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 'Switch') {
> !     $dsn = "$ENV{DBI_AUTOPROXY};dsn=dbi:$driver:$dsn";
>       $driver = 'Proxy';
> !     DBI->trace_msg("       DBI_AUTOPROXY: dbi:$driver:$dsn\n");
>       }
>   
>       my %attr;       # take a copy we can delete from
> --- 471,484 ----
>       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");
>       }
>   
>       my %attr;       # take a copy we can delete from
> ***************
> *** 2072,2085 ****
>   to define a syntax for the C<$data_source>, it is recommended that
>   they follow the ODBC style, shown in the last example above.)
>   
> ! If the environment variable C<DBI_AUTOPROXY> is defined (and the driver in
> ! C<$data_source> is not "C<Proxy>") then the connect request will
> ! automatically be changed to:
> ! 
> !   dbi:Proxy:$ENV{DBI_AUTOPROXY};dsn=$data_source
> ! 
> ! and passed to the DBD::Proxy module. C<DBI_AUTOPROXY> is typically set as
> ! "C<hostname=...;port=...>". See the DBD::Proxy documentation for more details.
>   
>   If C<$username> or C<$password> are undefined (rather than just empty),
>   then the DBI will substitute the values of the C<DBI_USER> and C<DBI_PASS>
> --- 2077,2092 ----
>   to define a syntax for the C<$data_source>, it is recommended that
>   they follow the ODBC style, shown in the last example above.)
>   
> ! If the environment variable C<DBI_AUTOPROXY> is defined (and the
> ! driver in C<$data_source> is not "C<Proxy>") then the connect request
> ! will automatically be changed to:
> ! 
> !   $ENV{DBI_AUTOPROXY};dsn=$data_source
> ! 
> ! C<DBI_AUTOPROXY> is typically set as "C<dbi:Proxy:hostname=...;port=...>".
> ! If $ENV{DBI_AUTOPROXY} doesn't begin with 'C<dbi:>' then "dbi:Proxy:"
> ! will be prepended to it first.  See the DBD::Proxy documentation
> ! for more details.
>   
>   If C<$username> or C<$password> are undefined (rather than just empty),
>   then the DBI will substitute the values of the C<DBI_USER> and C<DBI_PASS>
> 

Reply via email to