NAME

Paranoid::BerkeleyDB::Db -- BerkeleyDB Db Wrapper

VERSION

$Id: lib/Paranoid/BerkeleyDB/Db.pm, 2.02 2016/06/21 19:51:06 acorliss Exp $

SYNOPSIS

$db = Paranoid::BerkeleyDB::Db->new(-Filename => './dbdir/data.db');

$bdb = $db->db;
$env = $db->env;

DESCRIPTION

This module provides an OO-based wrapper for the BerkeleyDB::Btree(3) class. If you're using the Paranoid::BerkeleyDB(3) API this object is created for you automatically. There is probably no value in using this module directly.

This class places no restrictions on the use of any available BerkeleyDB::Btree(3) options.

SUBROUTINES/METHODS

new

$db = Paranoid::BerkeleyDB::Db->new(-Filename => './dbdir/data.db');

The only required argument is -Filename. For a complete list of all available options please see the BerkeleyDB(3) man page.

By default the following settings are applied unless overridden:

Parameter   Value
---------------------------------------------------
-Flags      DB_CREATE

db

$db = $db->db;

This returns a handle to the current BerkeleyDB::Btree(3) object.

env

$env = $db->env;

This returns a handle to the associated Paranoid::BerkeleyDB::Env(3) object, if one is being used.

DESTROY

A DESTROY method is provided which should sync and close an open database, as well as release any locks.

DEPENDENCIES

o

BerkeleyDB

o

Class::EHierarchy

o

Fcntl

o

Paranoid

o

Paranoid::Debug

o

Paranoid::IO

o

Paranoid::IO::Lockfile

BUGS AND LIMITATIONS

-Filename is interpreted differently depending on whether you're using an environment or not. If you're using this module as a standalone DB object any relative paths are interpreted according to your current working directory. If you are using an environment, however, it is interpreted relative to that environment's -Home.

SEE ALSO

L<BerkeleyDB(3)>

HISTORY

02/12/2016 Complete rewrite

AUTHOR

Arthur Corliss (corliss@digitalmages.com)

LICENSE AND COPYRIGHT

This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.

(c) 2005 - 2016, Arthur Corliss (corliss@digitalmages.com)