> when using the FOR loop without loop variable, the variables do not
> get cleared properly. Attached program shows this. The second output
> is correct.

This fixes the problem (patch against svn version):

Index: lib/Template/Directive.pm
===================================================================
--- lib/Template/Directive.pm   (revision 1259)
+++ lib/Template/Directive.pm   (working copy)
@@ -461,8 +461,10 @@
      \$stash->set('loop', \$_tt_list);
      eval {
  $label:   while (! \$_tt_error) {
+            $loop_save;
              $loop_set;
  $block;
+            $loop_restore;
              (\$_tt_value, \$_tt_error) = \$_tt_list->get_next();
          }
      };

Bye, Uwe


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to