Finance::Account::Archive - Storage of account balances
use Finance::Account::Archive; $archive = Finance::Account::Archive->new; $archive->display_all_entries; $archive->add_entry(name => "Checking", balance => 789.12); @entries = $archive->get_entries(name => "Savings");
$archive->run;
This module is for storing bank account information in a database. This information consists of an account name, a balance, and a date.
Creates a new archive (database), or connects to the existing one. The valid parameters, which are passed as a hash, are:
The database driver, which defaults to "Pg", for PostgreSQL. MySQL ("mysql") has
also been successfully used. See DBI for supported drivers.
The user name for connecting to the database. This defaults to "root" if the driver is "mysql", or an empty string otherwise.
The password for connecting to the database. This defaults to an empty string.
The name of the database, which defaults to "finances".
Disconnects from the database, which is done automatically when the Finance::Account::Archive instance is destroyed.
Creates the database and adds the "entry" table.
Creates the database and adds the "entry" table.
Returns whether an entry exists for the given name and date. If the date is not given, the current date is used.
Adds the given entry, if an existing one for the name and date does not exist.
Deletes the given entry, if it exists. balance and date are used only if
they are defined.
Updates the given entry, if it exists. The valid parameters, passed as a hash:
The current name of the existing entry.
The current balance of the existing entry.
The date of the existing entry. If not defined, it is assumed to refer to the current date.
The new name of the entry.
The new balance of the entry.
Dumps the entire entry table, formatted.
Removes the database.
Queries for entries, using the following parameters:
The account name.
The order in which to return the entries found.
The maximum number of entries to return.
The earliest date to query.
The latest date to query.
Interactively runs against the database, allowing the user to add, modify and delete data, and to add an account name.
Setting this to a non-zero value results in debugging output.
(Verbatim from Finance::Bank::LloydsTSB) This is code for online banking, and that means your money, and that means BE CAREFUL. You are encouraged, nay, expected, to audit the source of this module yourself to reassure yourself that I am not doing anything untoward with your banking data. This software is useful to me, but is provided under NO GUARANTEE, explicit or implied.
Jeff Pace jpace@cpan.org
Copyright 2005 by Jeff Pace.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.