Menu

#2 numerous fixes needed in recur.pl script

open
nobody
None
5
2001-10-04
2001-10-04
No

While running the recur.pl script in v. 0.9.2 (probably
also occurs in v. 0.9.5, but I haven't tried the fixes
yet), I ran across, and overcame, numerous errors in
the script.

First, here's the command I ran:
<lib_path>/contrib/recur.pl <acct_path>/<account>.cbb

The first error I received was:
Can't locate memorized.pl in @INC (@INC contains:
<bunch of paths> .) at <lib_path>/contrib/recur.pl line
42.

This I fixed by including the correct path in @INC
(this wasn't done automatically with the 'configure'
installation script). Then I received the error:

Undefined subroutine &CBB::current_acct called at
/home/rrahkola/lib/cbb-0.9.2/perl/accounts.pl line 253.

This was fixed by including the line 'require
"groups.pl";' before the line 'require "accounts.pl"'.
Next, the recur.pl script managed to chug along a while
and fail with:

Updating/deleting current recurring transactions:
Adding in future recurring transactions: Undefined
subroutine &main::timelocal called at
<lib_path>/contrib/recur.pl line 199, <RECUR> chunk 3.

(This refers to line 201 in the original code). The
code in question is:
$today_secs = &main'timelocal(0, 0, 0, $cmday,
$cmon, $cyear);

There are three uses of 'timelocal'. I took out the
"main'" and finally recur.pl ran correctly!

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.