=========================
[amahabal@satchel trunk]$ ./pugs examples/hanoi.p6
ndisks = 3
AS
AS
SS
AB
SS
SB
SB
=========================
A modified version that also prints out what arguments the function saw
spews this out:
=========================
[amahabal@satchel trunk]$ ./pugs ../../b2.p6 3
ndisks = 3
Called for 3 discs with A B S
Called for 2 discs with A S S
Called for 1 discs with A S S
Called for 0 discs with A S S
Disk 1 from A to S
Called for 0 discs with S S S
......
=========================
So something is wrong somewhere. Could it be that the function is
treating its variables not as "my" but something else? That is my guess,
but that something else is not the perl5 "local" or the perl5 "our"
because they would not produce this particular error.
I plan to explore this more later today.
--abhijit
sub h($x, $y){
say "$x $y";
}
g(10, 15);
=====================
This prints:
10 15
15 15
--abhijit
Great! I'd checked that example in knowing that there was a problem, but
I haven't had the time to track it down. Perhaps your simpler exposition
of the problem could be the basis of a good test.
-Scott
--
Jonathan Scott Duff
du...@pobox.com