===========================
 Using the Brinance module
===========================

   Version of 3 of Brinance introduced a Perl module that does all the heavy
lifting for you. Herein, you'll find documentation for each subroutine and
variable in the module.

subroutines:

sub &Brinance::version ():
   Takes no arguments. Returns the value of the global $VERSION string, the
version of the module.

sub &Brinance::getName ():
   Takes no arguments. Returns the name of the current account, or undef if
there is no name.

sub &Brinance::balance ():
   Takes no arguments. Returns the balance of the current account.

sub &Brinance::trans ( $amount, $comment ):
   Takes two arguments: a transaction amount, and a string describing the
transaction. Applies a transaction against the current account. This subroutine
is called for either a credit or a debit. Negative amounts are debits, positive
are credits. The subroutine returns as follows:
   0 => success
  -1 => Too few arguments (two are required)
  -2 => A zero-value transaction, which is meaningless, and might mean a
non-number was passed as the transaction amount

sub &Brinance::futurebalance ( $futureDate ):
   Takes one argument: a future date in 12-digit format (YYYYMMDDHHmm, e.g.
200310271645). Calculates the balance for the current account at the specified
date. The subroutine returns as follows:
   undef     => Too few arguments (one is required), or argument is in the past
   otherwise => The future balance is returned

sub &Brinance::futuretrans ( &futureDate, $amount, $comment ):
   Takes three arguments: a future date in 12-digit format (YYYYMMDDHHmm, e.g.
200310271645), a transaction amount and a transaction comment. Applies the
transaction at the specified future date. The subroutine returns as follows:
   0 => success
  -1 => Too few arguments (three are required)
  -2 => A zero-value transaction, which is meaningless, and might mean a
non-number was passed as the transaction amount
  -3 => Date specified is not in the future

sub &Brinance::update_future ():
   Takes no arguments. Scans future file for the current account to see if there
are any transactions that are now in the past. If so, they are applied to the
current account file. Returns nothing.

sub &Brinance::create ( $accountName, $accountNumber ): 
   Takes two arguments: an account name and an account number. If you want to
create an account without a name, simply create two files (account# and
future#). The subroutine returns as follows:
   1 => The requested account already exists, no change
   0 => success
  -1 => Too few arguments (two are required)

sub &Brinance::switch_acct ( $accountNumber ):
   Takes one argument: the account number to switch to. Makes sure the requested
account exists, and errors is not. The subroutine returns as follows:
   1 => initial creation of account0, the default, success
   0 => account exists, success
  -1 => account doesn't exist, unsafe to use

sub &Brinance::renow ():
   Takes no arguments. Reinitializes the $Brinance::now variable to the current
time. Should not need to be called by external code; only used within the
module. Returns nothing.

variables:

$Brinance::current_acct:
   The number of the current account. This is the value at the end of the
account and future files, as in account0 and future0 for
$Brinance::current_acct = 0.  

$Brinance::$now:
   The current date and time in 12-digit format. Generated by running the
command: `date +%C%y%m%d%H%M`.

$Brinance::$account_dir:
   A string indicating where Brinance looks for all of its account files,
generally set to ~/.brinance/.

