From: rkinyon Date: Wed, 15 Feb 2006 20:18:47 +0000 (+0000) Subject: close() -> _close() X-Git-Tag: 0-97~69 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0207d6480b857ce77f029ecedcd0d354bfe2ae29;p=dbsrgits%2FDBM-Deep.git close() -> _close() --- diff --git a/Changes b/Changes index d5c5b75..4f813a6 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,7 @@ Revision history for DBM::Deep. - 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) diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 342bd20..9f29344 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -223,7 +223,7 @@ sub DESTROY { $self->root->{links}--; if (!$self->root->{links}) { - $self->close(); + $self->_close(); } } @@ -234,7 +234,7 @@ sub _open { ## 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' ); @@ -277,7 +277,7 @@ sub _open { # 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"); } @@ -295,7 +295,7 @@ sub _open { return 1; } -sub close { +sub _close { ## # Close database FileHandle ## @@ -1041,7 +1041,7 @@ sub optimize { # with a soft copy. ## $self->unlock(); - $self->close(); + $self->_close(); } if (!rename $self->root->{file} . '.tmp', $self->root->{file}) { @@ -1051,7 +1051,7 @@ sub optimize { } $self->unlock(); - $self->close(); + $self->_close(); $self->_open(); return 1; diff --git a/t/13clone.t b/t/13clone.t index 9be6f72..8aaf388 100644 --- a/t/13clone.t +++ b/t/13clone.t @@ -34,7 +34,6 @@ is($clone->{key1}, "value1"); is($clone->{key2}, "value2"); is($clone->{key3}, "value3"); -$db->close; undef $db; is($clone->{key1}, "value1");