$count2 in fines.pl and other questions
Okay, I'm back from a busy weekend and back to schlepping through code. Todays questions are: in fines.pl there's a $count2 variable it's declared and assigned a value of 0. Then in (if an item is overdue -- I think) it's incremented. It's not referenced anywhere else in the code. Is it supposed to hold the number of overdue items? Is it going to be used for something, or can it be removed? thanks, -pate
On Mon, Apr 08, 2002 at 08:07:57PM -0400, Pat Eyler said:
Okay, I'm back from a busy weekend and back to schlepping through code. Todays questions are: in fines.pl there's a $count2 variable it's declared and assigned a value of 0. Then in (if an item is overdue -- I think) it's incremented. It's not referenced anywhere else in the code. Is it supposed to hold the number of overdue items? Is it going to be used for something, or can it be removed?
You can safely ignore fines.pl, fines2.pl in misc is the real overdue calculating script. But it has the same thing, and yep that was just a debugging tool :-) So it can disappear Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
On Tue, 9 Apr 2002, Chris Cormack wrote:
You can safely ignore fines.pl, fines2.pl in misc is the real overdue calculating script.
Does this mean fines.pl can disappear and fines2.pl be renamed to fines.pl (no sense in leaving dead files around to confuse people).
But it has the same thing, and yep that was just a debugging tool :-) So it can disappear
I thought it might be. I've noticed a few other things that look like debugging code. What about making them more obvious (and leaving them uncommented if you like) by doing something like: print $numOverdueItems if $DEBUG then when we want to debug something ... we just define a global $DEBUG and voila. -pate
Chris
On Mon, Apr 08, 2002 at 09:02:52PM -0400, Pat Eyler said:
On Tue, 9 Apr 2002, Chris Cormack wrote:
You can safely ignore fines.pl, fines2.pl in misc is the real overdue calculating script.
Does this mean fines.pl can disappear and fines2.pl be renamed to fines.pl (no sense in leaving dead files around to confuse people).
I thought i already had, at least im pretty sure i removed fines.pl from the cvs tree. I didnt rename fines2.pl tho.
I thought it might be. I've noticed a few other things that look like debugging code. What about making them more obvious (and leaving them uncommented if you like) by doing something like:
print $numOverdueItems if $DEBUG
then when we want to debug something ... we just define a global $DEBUG and voila.
Excellent plan Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (2)
-
Chris Cormack -
Pat Eyler