NAME

Thesaurus::BerkeleyDB - Store thesaurus data in a BerkeleyDB database

SYNOPSIS

  use Thesaurus::BerkeleyDB;

  my $book = Thesaurus::BerkeleyDB->new( filename => '/some/file/name.db' );

DESCRIPTION

This subclass of Thesaurus implements persistence by using a BerkeleyDB file.

This module requires the BerkeleyDB module from CPAN.

METHODS

  • 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.