Wallet::Dabase

(Wrapper module for wallet database connections)

SYNOPSIS

    use Wallet::Database;
    my $dbh = Wallet::Database->connect;

DESCRIPTION

Wallet::Database is a thin wrapper module around DBI that takes care of building a connect string and setting database options based on wallet configuration. The only overridden method is connect(). All other methods should work the same as in DBI and Wallet::Database objects should be usable exactly as if they were DBI objects.

connect() will obtain the database connection information from the wallet configuration; see Wallet::Config for more details. It will also automatically set the RaiseError attribute to true and the PrintError and AutoCommit attributes to false, matching the assumptions made by the wallet database code.

CLASS METHODS

connect()

Opens a new database connection and returns the database object. On any failure, throws an exception. Unlike the DBI method, connect() takes no arguments; all database connection information is derived from the wallet configuration.

SEE ALSO

DBI(3), Wallet::Config(3)

This module is part of the wallet system. The current version is available from <https://www.eyrie.org/~eagle/software/wallet/>.

AUTHOR

Russ Allbery <eagle@eyrie.org>

Last spun 2022-12-12 from POD modified 2020-05-18