Here's some code:
[%
USE Dumper;
curcol = 0;
cols = [];
Dumper.dump([cols, curcol]);
FOREACH [0, 1];
cols.$curcol = 1;
curcol = curcol + 1;
Dumper.dump([cols, curcol]);
END;
%]
It gives me:
$VAR1 = [
[],
0
];
$VAR1 = [
[
1
],
1
];
$VAR1 = [
[
1,
${\$VAR1->[0][0]}
],
2
];
I expect that last reference to be "1", not a reference. If I use
Template::Stash instead of Template::Stash::XS, then I get the expected
result.
Also, if I do not put it in a loop, I get the expected result:
[%
USE Dumper;
curcol = 0;
cols = [];
Dumper.dump([cols, curcol]);
cols.$curcol = 1;
curcol = curcol + 1;
Dumper.dump([cols, curcol]);
cols.$curcol = 1;
curcol = curcol + 1;
Dumper.dump([cols, curcol]);
%]
I checked this in 2.07 and 2.08c, too. Broken in all.
If someone knows how to fix this, please send me a patch. :-)
--
Chris Nandor [EMAIL PROTECTED] http://pudge.net/
Open Source Development Network [EMAIL PROTECTED] http://osdn.com/
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates