Revision history for DBM::Deep.
+1.0010 May 14 12:00:00 2008 EST
+ - (This version is compatible with 1.0009)
+ - Fix for RT#35140 (invalid POD links)
+
1.0009 Mar 19 12:00:00 2008 EDT
- (This version is compatible with 1.0008)
- Internal refactorings to prepare for some optimizations.
use strict;
use warnings;
-our $VERSION = q(1.0009);
+our $VERSION = q(1.0010);
use Fcntl qw( :flock );
use Scalar::Util ();
Alternately, you can create a DBM::Deep handle by using Perl's built-in
tie() function. The object returned from tie() can be used to call methods,
such as lock() and unlock(). (That object can be retrieved from the tied
-variable at any time using tied() - please see L<perltie/> for more info.
+variable at any time using tied() - please see L<perltie> for more info.
my %hash;
my $db = tie %hash, "DBM::Deep", "foo.db";
(exclusive or shared). Use one of these two constants:
C<DBM::Deep-E<gt>LOCK_EX> or C<DBM::Deep-E<gt>LOCK_SH>. These are passed
directly to C<flock()>, and are the same as the constants defined in Perl's
-L<Fcntl/> module.
+L<Fcntl> module.
$db->lock( $db->LOCK_SH );
# something here
=head2 Examples
-Please read L<DBM::Deep::Manual/> for examples of filters.
+Please read L<DBM::Deep::Manual> for examples of filters.
=head1 ERROR HANDLING
Right now, importing is done using C<Clone::clone()> to make a complete copy
in memory, then tying that copy. It would be much better to use
-L<Data::Walker/> to walk the data structure instead, particularly in the case
+L<Data::Walker> to walk the data structure instead, particularly in the case
of large datastructures.
=head2 Different contention resolution mechanisms
=item * CODE
-L<Data::Dump::Streamer/> provides a mechanism for serializing coderefs,
+L<Data::Dump::Streamer> provides a mechanism for serializing coderefs,
including saving off all closure state. This would allow for DBM::Deep to
store the code for a subroutine. Then, whenever the subroutine is read, the
code could be C<eval()>'ed into being. However, just as for SCALAR and REF,
=head1 CODE COVERAGE
-L<Devel::Cover/> is used to test the code coverage of the tests. Below is the
-L<Devel::Cover/> report on this distribution's test suite.
+L<Devel::Cover> is used to test the code coverage of the tests. Below is the
+L<Devel::Cover> report on this distribution's test suite.
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
use strict;
use warnings;
-our $VERSION = q(1.0009);
+our $VERSION = q(1.0010);
# This is to allow DBM::Deep::Array to handle negative indices on
# its own. Otherwise, Perl would intercept the call to negative
=head1 DESCRIPTION
-This is the Cookbook for L<DBM::Deep/>. It contains useful tips and tricks,
+This is the Cookbook for L<DBM::Deep>. It contains useful tips and tricks,
plus some examples of how to do common tasks.
=head1 RECIPES
$db->set_filter( 'retrieve_value' => sub { pack "C*", unpack "U0C*", $_[0] } );
In a future version, you will be able to specify C<utf8 =E<gt> 1> and
-L<DBM::Deep/> will do these things for you.
+L<DBM::Deep> will do these things for you.
=head2 Real-time Encryption Example
use strict;
use warnings;
-our $VERSION = q(1.0009);
+our $VERSION = q(1.0010);
use Scalar::Util ();
use strict;
use warnings;
-our $VERSION = q(1.0009);
+our $VERSION = q(1.0010);
use Fcntl qw( :DEFAULT :flock :seek );
use FileHandle::Fmode ();
use strict;
use warnings;
-our $VERSION = q(1.0009);
+our $VERSION = q(1.0010);
use base 'DBM::Deep';
format used during the development from 0.983 to 1.0000. It will be rewritten
soon.
-This is a document describing the internal workings of L<DBM::Deep/>. It is
+This is a document describing the internal workings of L<DBM::Deep>. It is
not necessary to read this document if you only intend to be a user. This
document is intended for people who either want a deeper understanding of
-specifics of how L<DBM::Deep/> works or who wish to help program
-L<DBM::Deep/>.
+specifics of how L<DBM::Deep> works or who wish to help program
+L<DBM::Deep>.
=head1 CLASS LAYOUT
-L<DBM::Deep/> is broken up into five classes in three inheritance hierarchies.
+L<DBM::Deep> is broken up into five classes in three inheritance hierarchies.
=over 4
=item *
-L<DBM::Deep/> is the parent of L<DBM::Deep::Array/> and L<DBM::Deep::Hash/>.
+L<DBM::Deep> is the parent of L<DBM::Deep::Array> and L<DBM::Deep::Hash>.
These classes form the immediate interface to the outside world. They are the
classes that provide the TIE mechanisms as well as the OO methods.
=item *
-L<DBM::Deep::Engine/> is the layer that deals with the mechanics of reading
+L<DBM::Deep::Engine> is the layer that deals with the mechanics of reading
and writing to the file. This is where the logic of the file layout is
handled.
=item *
-L<DBM::Deep::File/> is the layer that deals with the physical file. As a
+L<DBM::Deep::File> is the layer that deals with the physical file. As a
singleton that every other object has a reference to, it also provides a place
to handle datastructure-wide items, such as transactions.
=head1 PERFORMANCE
-L<DBM::Deep/> is written completely in Perl. It also is a multi-process DBM
+L<DBM::Deep> is written completely in Perl. It also is a multi-process DBM
that uses the datafile as a method of synchronizing between multiple
processes. This is unlike most RDBMSes like MySQL and Oracle. Furthermore,
-unlike all RDBMSes, L<DBM::Deep/> stores both the data and the structure of
+unlike all RDBMSes, L<DBM::Deep> stores both the data and the structure of
that data as it would appear in a Perl program.
=head2 CPU
=head2 MEMORY USAGE
-One of the great things about L<DBM::Deep/> is that it uses very little memory.
+One of the great things about L<DBM::Deep> is that it uses very little memory.
Even with huge databases (1,000,000+ keys) you will not see much increased
-memory on your process. L<DBM::Deep/> relies solely on the filesystem for storing
+memory on your process. L<DBM::Deep> relies solely on the filesystem for storing
and fetching data. Here is output from I<top> before even opening a database
handle: