MCDB_File

 view release on metacpan or  search on metacpan

MCDB_File.pm  view on Meta::CPAN


    mcdb - fast, reliable, simple code to create, read constant databases

=head2 Reading from an mcdb constant database

After the C<tie> shown above, accesses to C<%h> will refer
to the B<mcdb> file C<file.mcdb>, as described in L<perlfunc/tie>.

C<keys>, C<values>, and C<each> can be used to iterate through records.
Note that only one iteration loop can be in progress at any one time.
Performing multiple iterations at the same time (i.e. in nested loops)
will not have independent iterators and therefore should be avoided.
Note that it is safe to use the find('key') method while iterating.
See PERFORMANCE section below for sample usage.

=head2 Creating an mcdb constant database

An B<mcdb> file is created in three steps.  First call
C<new MCDB_File::Make($fname)>, where C<$fname> is the name of the
database file to be created.  Secondly, call the C<insert> method
once for each (I<key>, I<value>) pair.  Finally, call the C<finish>



( run in 0.595 second using v1.01-cache-2.11-cpan-71847e10f99 )