SYNOPSIS use Ledger::Parser; my $ledgerp = Ledger::Parser->new( # year => undef, # default: current year # input_date_format => 'YYYY/MM/DD', # or 'YYYY/DD/MM', ); # parse a file my $journal = $ledgerp->read_file("$ENV{HOME}/money.dat"); # parse a string $journal = $ledgerp->read_string(< str ('YYYY/MM/DD' or 'YYYY/DD/MM') Ledger accepts dates in the form of yearless (e.g. 01/02, 3-12) or with 4-digit year (e.g. 2015/01/02, 2015-3-12). Month and day can be single- or double-digits. Separator is either - or /. When year is omitted, year will be retrieved from the year attribute. The default format is month before day (YYYY/MM/DD), but you can also use day before month (YYYY/DD/MM). year => int (default: current year) Only used when encountering a date without year. METHODS new(%attrs) => obj Create a new parser instance. Return parser object. $ledgerp->read_file($filename) => obj Parse a journal file. Return Ledger::Journal document object. $ledgerp->read_string($str) => obj Parse a journal string. Return Ledger::Journal document object.