CDB_File_Thawed - Storable thaw() values in a CDB_File
# to create a CDB file: my $cdb = CDB_File_Thawed->new($filename, $tempfile) or die $!; $cdb->insert($key1, $value1); $cdb->insert($key2, $value2); $cdb->finish; # to use a CDB file: tie my %cdb, 'CDB_File_Thawed', $filename2 or die "tie failed: $!\n"; # use %cdb has a normal (but read-only) hash
This module is a small wrapper around CDB_File which makes sure to use Storable's nfreeze() and thaw() methods to store values. CDB_File is an interface to Dan Berstein's Constant DataBase library, which as the name implies is a fast, reliable, simple package for creating and reading constant databases. Using this module you can store Perl data structures and objects in a fast CDB_File.
The constructor. Takes the destination filename and a temporary fiename as arguments:
my $cdb = CDB_File_Thawed->new($filename, $tempfile) or die $!;
Inserts a key, value pair. The value may be a data structure or object:
Finalised the new CDB file:
Copyright (C) 2005, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.