- The following methods have been renamed to reflect their private nature:
- init() is now _init()
- open() is now _open()
+ - close() is now _close()
0.96 Oct 14 09:55:00 2005 Pacific
- Fixed build (OS X hidden files killed it)
$self->root->{links}--;
if (!$self->root->{links}) {
- $self->close();
+ $self->_close();
}
}
##
my $self = _get_self($_[0]);
- if (defined($self->fh)) { $self->close(); }
+ if (defined($self->fh)) { $self->_close(); }
if (!(-e $self->root->{file}) && $self->root->{mode} eq 'r+') {
my $temp = FileHandle->new( $self->root->{file}, 'w' );
# Check signature was valid
##
unless ($signature eq SIG_FILE) {
- $self->close();
+ $self->_close();
return $self->throw_error("Signature not found -- file is not a Deep DB");
}
return 1;
}
-sub close {
+sub _close {
##
# Close database FileHandle
##
# with a soft copy.
##
$self->unlock();
- $self->close();
+ $self->_close();
}
if (!rename $self->root->{file} . '.tmp', $self->root->{file}) {
}
$self->unlock();
- $self->close();
+ $self->_close();
$self->_open();
return 1;
is($clone->{key2}, "value2");
is($clone->{key3}, "value3");
-$db->close;
undef $db;
is($clone->{key1}, "value1");