Thesaurus::BerkeleyDB - Store thesaurus data in a BerkeleyDB database
use Thesaurus::BerkeleyDB; my $book = Thesaurus::BerkeleyDB->new( filename => '/some/file/name.db' );
This subclass of Thesaurus implements persistence by using a BerkeleyDB file.
Thesaurus
This module requires the BerkeleyDB module from CPAN.
BerkeleyDB
new
This subclass's new method takes the following parameters, in addition to those accepted by its parent class:
filename => $filename
A filename for the database file. It should be noted that the BerkeleyDB library will usually create extra files for its own use. These will be created in the same directory as the given filename.
locking => $boolean
If this is true, then the BerkeleyDB concurrent locking system is used for this database. This system can handle reads and writes from multiple processes safely. This parameter defaults to false.
mode => $mode
An octal mode to be used if the database file needs to be created. This defaults to 0644.
delete
This subclass overrides the delete() method.
delete()
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.