Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vec clears tied gdbm file #157

Closed
p5pRT opened this issue Jul 3, 1999 · 1 comment
Closed

vec clears tied gdbm file #157

p5pRT opened this issue Jul 3, 1999 · 1 comment

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jul 3, 1999

Migrated from rt.perl.org#962 (status was 'resolved')

Searchable as RT962$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 3, 1999

From nagler@bivio.com

BEGIN { $| = 1; print "1..4\n"; }
my($loaded) = 0;
END {print "not ok 1\n" unless $loaded;}
use GDBM_File ();
$loaded = 1;
print "ok 1\n";

my(%hash);
vec($hash{0}, 0, 1) = 1;
defined($hash{0}) || die "not ok 2";
print "ok 2\n";

my($file) = 'rjn$$';
tie(%hash, 'GDBM_File', $file,
  GDBM_File->GDBM_WRCREAT, 0600);
unlink($file);
my($v) = $hash{0};
vec($v, 0, 1) = 1;
$hash{0} = $v;
defined($hash{0}) || die "not ok 3";
print "ok 3\n";
untie(%hash);

my($file) = 'rjn$$';
tie(%hash, 'GDBM_File', $file,
  GDBM_File->GDBM_WRCREAT, 0600);
unlink($file);
vec($hash{0}, 0, 1) = 1;
defined($hash{0}) || die "not ok 4";
print "ok 4\n";
__END__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.