< Wallet::Config API | Russ Allbery > Software > wallet | Wallet::Kadmin API > |
(Wrapper module for wallet database connections)
use Wallet::Database; my $dbh = Wallet::Database->connect;
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.
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.
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/>.
Russ Allbery <eagle@eyrie.org>
< Wallet::Config API | Russ Allbery > Software > wallet | Wallet::Kadmin API > |