1) I need to execute some parts of code right after controller's action. 
For example, I'm prepairing one part of my layout only after controller's 
actions, because I need to update "message counters" text after controller 
updates it in DB. I can put these code into template, but it very bad 
variant. I need something like after_controller/before_render hook.
2) I need to execute some part of my layout code only for specific formats 
(only for HTML). That why I need some hook, where I can use 
$self->stash('format'). So, or something after_routes/before_controller or 
after_controller/before_render.
3) I want to use mobile version of template if it exists. But I don't like 
to write boilerplate code in each action, like 
$self->render_maybe('blog/list.mobile') or $self->render('blog/list');

среда, 8 января 2014 г., 16:47:32 UTC+2 пользователь sri написал:
>
> I want to have "before_render" hook.
>>
>
> Why? We generally don't add new hooks unless they have at least two 
> independent use cases, to ensure they are generic enough.
>
> --
> sebastian 
>

-- 
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/groups/opt_out.

Reply via email to