>
> The problem is that some of the display logic is fairly complicated: 
> one of my templates has a 30 line <% %> block before anything can be 
> displayed. It strikes me that these 30 lines (and others) are better 
> off in a subroutine or method. But where? MyApp::View? How would I 
> call it from a template? None of the documentation I can find 
> addresses this. I appreciate any pointers or examples. 
>

 You want application specific plugins with helpers.

https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Adding-a-plugin-to-your-application
https://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Adding-helpers

--
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 mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/0ed8a6ec-6654-43b1-9bc4-6563174d0976n%40googlegroups.com.

Reply via email to