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;