Finance-Bank-PSK

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - fixed a few typos in the man page.
        - changed version to 1.04, inspired by a talk about CPANTS
          at a vienna.pm techmeet.

0.03  Thu Aug 14 19:31:07 CEST 2003
	- removed calls to deprecated WWW::Mechanize methods
	  follow and form.
	- added new method get_entries.
	- added new attribute newline (used by get_entries).
	- updated examples.pl
	- added examples-gpg.pl
	- added EXAMPLES section to man page.
	- Agent now identifies itself as 'Mac Safari' :)

0.02  Fri Jun 20 23:17:36 CEST 2003
	- PSK.pm no longer uses Data::Dumper.
	- PSK.pm uses croak instead of die now.
        - splited POD and code into separate files.
	- fixed a few typos in the man page.

0.01  Wed Jan 29 22:54:22 CET 2003

MANIFEST  view on Meta::CPAN

Changes
MANIFEST
Makefile.PL
README
examples/balance.pl
examples/balance-gpg.pl
lib/Finance/Bank/PSK.pm
lib/Finance/Bank/PSK.pod
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.1 2003/08/14 21:42:01 florian Exp $

use Finance::Bank::PSK;
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

        foreach my $row (@$entries) {
                $row->{text} =~ s/(.{50}).*/$1.../;

                printf("%7s %5s %53s %9.2f\n",
                        @{$row}{qw/nr value text amount/}
                );
        }
}

sub get_secrets {
        my $secrets = '/Users/florian/bin/psk.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/PSK.pod  view on Meta::CPAN


Scalar which should be used instead of the HTML breaklines (default '; ').

=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.180 second using v1.01-cache-2.11-cpan-e1769b4cff6 )