Finance-Bank-easybank

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - fixed a few typos in the man page.
	- replaced map with hash slice in example scripts.
	- Agent now identifies itself as 'Mac Safari' :)

0.02  Sat Feb 22 22:34:24 CET 2003
        - check_balance returns now a list of the accounts checked
          ONLY if called in list context, otherwise it returns an
          hashref, with the account numbers as keys.
        - added new method get_entries.
        - updated examples/balance.pl.
        - added examples/balance-gpg.pl.
        - the module croaks now, if the login failes.
        - splited POD and code into separate files.
        - added in code documentation.
        - fixed a few typos in the man page.

0.01  Mon Jan 27 23:21:34 2003
        - original version; created by h2xs 1.2 with options
                -X -n Finance::Bank::easybank

MANIFEST  view on Meta::CPAN

Changes
lib/Finance/Bank/easybank.pm
lib/Finance/Bank/easybank.pod
examples/balance.pl
examples/balance-gpg.pl
Makefile.PL
MANIFEST
README
test.pl
META.yml                                 Module meta-data (added by MakeMaker)

examples/balance-gpg.pl  view on Meta::CPAN

#!/usr/bin/perl

# $Id: balance-gpg.pl,v 1.3 2003/10/06 20:36:43 florian Exp $

use Finance::Bank::easybank;
use GnuPG::Interface;
use IO::File;
use IO::Handle;
use YAML qw/Load/;

use strict;
use warnings;

examples/balance-gpg.pl  view on Meta::CPAN

				$row->{amount}
			);      
		}
	}

        print "\n";
}


sub get_secrets {
        my $secrets = '/Users/florian/bin/easybank.gpg';
        my $cipher  = IO::File->new;
        my $input   = IO::Handle->new;
        my $output  = IO::Handle->new;
        my $gnupg   = GnuPG::Interface->new;
        my $pid;
        my $plain;

        $cipher->open($secrets, 'r')
                or die sprintf("Couldn't open %s\n", $secrets);

lib/Finance/Bank/easybank.pod  view on Meta::CPAN

float or just as it gets it from the online banking system (default:
false).

=back

=head1 EXAMPLES

In the C<examples> directory of the distribution are two example scripts
which show the usage of this module. Both scripts can be used out of
the box and should represent a good starting point for a solution which
fits your particular needs (I use a copy of C<balance-gpg.pl> on a daily
basis).

=over

=item balance.pl

The very same script as seen in the C<SYNOPSIS>. Shows the basic usage,
defines all authentication settings directly in the script.

The main problem with this approach is of course the fact, that the
sensible authentication data is stored in clear text in the script
itself. Not a good thing at all if you're using it in an multiuser
environment or on a mobile computer.

But do not fear - help in form of GPG is on the way (see C<balance-gpg.pl>).

=item balance-gpg.pl

This script does the same thing as C<balance.pl> but gets all the
configuration settings from an C<GPG> encrypted file which is decrypted
on the fly at startup, C<GPG> will interactive ask for your passphrase.

To use this example script you need to set up C<GPG> and install
C<GnuPG::Interface>, C<IO::File>, C<IO::Handle> and C<YAML> on your
machine.

The encrypted file should have the following structure (in case of C<YAML>):



( run in 1.289 second using v1.01-cache-2.11-cpan-e1769b4cff6 )