The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Finance::OFX::Parse::Simple - Parse a simple OFX file or scalar

VERSION

Version 0.05

SYNOPSIS

use Finance::OFX::Parse::Simple;

my $parser = Finance::OFX::Parse::Simple->new;

my $data_from_file     = $parser->parse_file("myfile.ofx"); # returns a reference to a list of hash references

my $data_from_scalar   = $parser->parse_scalar($ofx_data); 

METHODS

new

Create a new parser object.

parse_file

Takes a filename as an argument, slurps the file into memory, parses it and returns a reference to a list of hash references. Each hash reference contains two keys: 'account_id' which is the account number, and 'transactions' which is a reference to a list of hash references, each containing details for a single transaction.

Returns false if no filename was provided, the file is not a plain file, or the file is not openable.

parse_scalar

Takes a scalar as an argument containing OFX data. Returns a reference to a list of hash references. Each hash reference contains two keys: 'account_id' which is the account number, and 'transactions' which is a reference to a list of hash references, each containing details for a single transaction.

Returns false if no non-empty scalar is provided.

WARNING

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.

AUTHOR

Jeremy Jones, <jjones at cpan.org>

BUGS

This module is intended to be fit-for-purpose, that purpose being simple parsing of real-world OFX files as provided for download by online banking systems. For more thorough and better treatment of your OFX data see Finance::OFX::Parse.

Please report any bugs or feature requests to bug-finance-ofx-parse-simple at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Finance-OFX-Parse-Simple.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Finance::OFX::Parse::Simple

The latest version of this module is available on Github:

http://github.com/JeremyJones/Finance--OFX--Parse--Simple

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009-10 Jeremy Jones, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.