The file t/lib/gdbm.t assumes that GDBM_File was built as a distributed
extension. But some of us prefer to build GDBM_File as an add-on extension,
which means it won't be in Config.pm and so gdbm.t won't run. I know this
has been mentioned here a few times. This patch is intended to address this
issue.
I've taken a few guesses here that are worth discussing. I unshift '../lib'
into @INC rather than wiping out all of @INC. Maybe it should add ./blib or
../blib if it exists?
Dean
*** t/lib/gdbm.t Tue Oct 18 11:44:13 1994
--- ../patches/gdbm.t Mon Sep 11 15:56:54 1995
***************
*** 3,17 ****
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
! @INC = '../lib';
! require Config; import Config;
! if ($Config{'extensions'} !~ /\bGDBM_File\b/) {
! print "1..0\n";
! exit 0;
! }
}
-
- use GDBM_File;
print "1..12\n";
--- 3,17 ----
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
! chdir 't' if -d 't';
! unshift @INC, '../lib';
! eval { require GDBM_File };
! if( $@ ){
! print "1..0\n";
! exit 0;
! }
! import GDBM_File;
}
print "1..12\n";
extension. But some of us prefer to build GDBM_File as an add-on extension,
which means it won't be in Config.pm and so gdbm.t won't run. I know this
has been mentioned here a few times. This patch is intended to address this
issue.
I've taken a few guesses here that are worth discussing. I unshift '../lib'
into @INC rather than wiping out all of @INC. Maybe it should add ./blib or
../blib if it exists?
Dean
*** t/lib/gdbm.t Tue Oct 18 11:44:13 1994
--- ../patches/gdbm.t Mon Sep 11 15:56:54 1995
***************
*** 3,17 ****
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
! @INC = '../lib';
! require Config; import Config;
! if ($Config{'extensions'} !~ /\bGDBM_File\b/) {
! print "1..0\n";
! exit 0;
! }
}
-
- use GDBM_File;
print "1..12\n";
--- 3,17 ----
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
! chdir 't' if -d 't';
! unshift @INC, '../lib';
! eval { require GDBM_File };
! if( $@ ){
! print "1..0\n";
! exit 0;
! }
! import GDBM_File;
}
print "1..12\n";