use DB_File;
use Fcntl;
-use vars qw($dbh $Dfile $bad_ones $FA) ;
+our ($dbh, $Dfile, $bad_ones, $FA);
# full tied array support started in Perl 5.004_57
# Double check to see if it is available.
{
print STDERR <<EOM unless $bad_ones++ ;
#
-# Some older versions of Berkeley DB version 1 will fail tests 51,
-# 53 and 55.
+# Some older versions of Berkeley DB version 1 will fail tests 61,
+# 63 and 65.
#
# You can safely ignore the errors if you're never going to use the
# broken functionality (recno databases with a modified bval).
$total_tests += $splice_tests if $FA ;
print "1..$total_tests\n";
-my $Dfile = "recno.tmp";
+$Dfile = "recno.tmp";
unlink $Dfile ;
umask(0);
# Check the interface to RECNOINFO
-my $dbh = new DB_File::RECNOINFO ;
+$dbh = new DB_File::RECNOINFO ;
ok(1, ! defined $dbh->{bval}) ;
ok(2, ! defined $dbh->{cachesize}) ;
ok(3, ! defined $dbh->{psize}) ;
use warnings ;
use strict ;
- use vars qw( @ISA @EXPORT) ;
+ our (@ISA, @EXPORT);
require Exporter ;
use DB_File;
1 ;
EOM
- close FILE ;
+ close FILE or die "Could not close: $!";
BEGIN { push @INC, '.'; }
eval 'use SubDB ; ';
eval '
$X = tie(@h, "SubDB","recno.tmp", O_RDWR|O_CREAT, 0640, $DB_RECNO );
' ;
+ die "Could not tie: $!" unless $X;
main::ok(68, $@ eq "") ;
use warnings FATAL => qw(all);
use strict ;
- use vars qw(@h $H $file $i) ;
+ our (@h, $H, $file, $i);
use DB_File ;
use Fcntl ;
my ($s_r, $s_error, @s_warnings);
my $gather_warning = sub { push @s_warnings, $_[0] };
+ $offset = $#array if $offset and $offset > @array;
if ($context eq 'list') {
my @r;
eval {
# Now do the same for DB_File's version of splice
my ($ms_r, $ms_error, @ms_warnings);
$gather_warning = sub { push @ms_warnings, $_[0] };
+ $offset = $#h if $offset and $offset > @h;
if ($context eq 'list') {
my @r;
eval {