Nope, it can't be called recursively :(
среда, 10 сентября 2014 г., 14:04:37 UTC+3 пользователь Vladimir Melnik
написал:
>
> Alas, it didn't bring me any luck.
> Okay, begin/end-block is a nice thing too, will use it.
> Hope it can work recursively...
>
> среда, 10 сентября 2014 г., 13:43:25 UTC+3 пользователь vitas написал:
>>
>> On 09/10/2014 12:36 PM, vitas wrote:
>> > Hi,
>> >
>> >> % layout 'default';
>> >> <div class="container">
>> >> <h1>Make yourself at home, <%= $self->session('user_email')
>> %>!</h1>
>> >> % expand_tree($service_tree);
>> > > ..
>> >
>> > Try:
>> >
>> > %= expand_tree($service_tree)
>>
>> And, dirty hack:
>>
>> % sub expand_tree { begin
>> <pre>DEBUG</pre>
>> % my $node = shift;
>> % foreach my $node_type (keys(%{ $node })) {
>> <div class="<%= $node_type %>">
>> <h2><%= $node_type.'s' %></h2>
>> <ul>
>> % foreach my $child (keys(%{ $node->{$node_type} })) {
>> <li><%= $child %></li>
>> % }
>> </ul>
>> </div>
>> % }
>> % end -> (@_) }
>>
>> vitas
>> @;;
>>
>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.