count code
matthewt [Mon, 18 Feb 2008 18:28:34 +0000 (18:28 +0000)]
lib/Reaction/UI/RenderingContext/TT.pm

index b359747..c69fe18 100644 (file)
@@ -27,8 +27,10 @@ class TT is RenderingContext, which {
         my ($widget, $fname, $over) = @to;
         #warn "@to";
         if (defined $over) {
+          my $count = 0;
           $over->each(sub {
             local $args_copy{_} = $_[0];
+            local $args_copy{count} = ++$count;
             $body .= $widget->render($fname, $self, \%args_copy);
           });
         } else {