Skip Menu |

This queue is for tickets about the Finance-QIF CPAN distribution.

Report information
The Basics
Id: 8407
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Finance-QIF

People
Owner: NMCFARL [...] cpan.org
Requestors: jeff [...] boulter.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: (no value)



Subject: can't print splits
I can't seem to print any QIF that has a split in it. I get Not an ARRAY reference at /usr/lib/perl5/site_perl/5.6.1/Finance/QIF.pm line 296. It fails with the example attached which is from the examples. FreeBSD 4.7, perl 5.6.1
#!/usr/local/bin/perl -w use Finance::QIF; use strict; my $qif = Finance::QIF->new(type => "Bank"); my $item = Finance::QIF::Transaction->new(); $item->amount(-30); $item->payee("Cash withdrawal"); $item->splits( { category => "Food/Groceries", amount => 12.00 }, { category => "Stationery", amount => 5.00 }, { category => "Dining Out", amount => 13.00 } ); $qif->add($item); print $qif->as_qif;
From: Jeff Boulter
[guest - Fri Nov 12 22:14:12 2004]: Show quoted text
> I can't seem to print any QIF that has a split in it. > > I get Not an ARRAY reference at > /usr/lib/perl5/site_perl/5.6.1/Finance/QIF.pm line 296. > > It fails with the example attached which is from the examples. > > FreeBSD 4.7, perl 5.6.1
Looks like it's just missing some curly brackets. for (@$self->{splits}) { should be for (@{$self->{splits}}) {
This was exactly as stated. It is now fixed and with a few other very minor bug fixes uploaded to cpan as v 1.03 .