<%_('Draw halos')%> <%_('Page info')%>
% foreach my $item (@stack) { <& .frame, frame => $item &> % } <%args> @stack <%init> for my $id (0..$#stack) { my @kids; my $looking = $id; while (++$looking <= $#stack and $stack[$looking]->{depth} >= $stack[$id]->{depth} + 1) { push @kids, {id => $stack[$looking]{id}, path => $stack[$looking]{path}, render_time => $stack[$looking]{render_time}} if $stack[$looking]->{depth} == $stack[$id]->{depth} + 1; } $stack[$id]{kids} = \@kids; if ($stack[$id]{depth} > 1) { $looking = $id; $looking-- while ($stack[$looking]{depth} >= $stack[$id]{depth}); $stack[$id]{parent} = {id => $stack[$looking]{id}, path => $stack[$looking]{path}, render_time => $stack[$looking]{render_time}}; } } my $depth = 0; <%def .frame> <%args> $frame <%init> my $id = $frame->{id}; my @args; while (my ($key, $value) = splice(@{$frame->{args}},0,2)) { push @args, [$key, ref($value), $value]; } @args = sort {$a->[0] cmp $b->[0]} @args; my $prev = ''; my @stmts = @{$frame->{'sql_statements'} || []};