On Thu, Mar 11, 2004 at 05:45:37AM -0800, Jeff Zucker wrote:
> Tim Bunce wrote:
> 
> >Meanwhile, the best workaround for the DBI probably to make t/50dbm.t
> >remove from @INC any dirs which match /\/5\.[0-9.]$/ but which don't
> >also have an arch-specific directory in @INC.
> 
> This seems simpler (tests for ability to run a method than can only be 
> run if the arch-specific directory is there rather than testing for the 
> existence of the directory):
> 
>     for (qw(
>         SDBM_File GDBM_File NDBM_File ODBM_File DB_File BerkeleyDB
>     )){
>         undef $@;
>         eval {
>             require "$_.pm";
>             die "bad BerkeleyDB install"
>              if /BerkeleyDB/ and !BerkeleyDB::Term->can(
>                  'close_everything'
>              )
>         };
>         push @dbm_types, $_ unless $@;
>     }

That won't help because the failure doesn't happen when the module
is loaded, or even when used.  It happens when the script ends.  Once
you've require'd BerkeleyDB there's no way to stop it going bang.

And even if there was, that would just be a workaround for one
specific symptom for one DBM.

The fundamental problem is arch-specific extensions having their .pm
files installed into non-arch-specific directories. Those install
bugs should all be fixed by now but some .pm's will still be in the
wrong place in some installations somewhere waiting to cause problems.

The @INC editing I've checked in seems like the right fix here.

Tim.

Reply via email to