Thesaurus::DBM - Subclass of Thesaurus that ties data structure to DBM file.
use Thesaurus qw(DB_File Storable); my $book = Thesaurus->new( ignore_case => 1, filename => $filename, flags => $flags, mode => $mode, extra => \@more_params );
This subclass of Thesaurus implements a tied interface to a DBM file on disk, allowing persistence.
Thesaurus::DBM takes the same parameters as MLDBM. The most important are the first two, which are the DBM file module to use and the serialization module to use. See the MLDBM documentation for more details.
new( %params );
This method returns a new Thesaurus::DBM object tied to a DBM file as defined by the parameters passed to this method.
This method takes the following parameters:
ignore_case (0 or 1) - A boolean parameter. If true, then the object will be case insensitive. It is _always_ case-preservative for its data.
filename ($) - The DBM filename.
flags ($) - Flags passed to the appropriate DBM module.
mode ($) - Mode passed to the appropriate DBM module.
extra (\@) - Anything passed to this parameter will be passed to the DBM module as an additional argument.
For the BerkeleyDB module, and others that don't follow the AnyDBM_File module syntax, just put all the parameters in extra and Thesaurus::DBM will handle this appropriately.
All other methods are indentical to Thesaurus.
Dave Rolsky, <autarch@urth.org>
Thesaurus, Thesaurus::File, Thesaurus::DBI, MLDBM, DB_File, GDBM_File, SDBM_File, NDBM_File, ODBM_File
Copyright (c) 1999 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Thesaurus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Thesaurus
CPAN shell
perl -MCPAN -e shell install Thesaurus
For more information on module installation, please visit the detailed CPAN module installation guide.