Hi, I was lookint to a way of organizing the helpers needed for an application (a very silly one, it's just to learn Mojolicious) and I found a little section in the rendering guide (http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Adding-helpers) that talks about using prefixes in the helper names, creating 'proxy helpers' that in turns allow to call the "real" helper in an indirect way. The bothering part is the "feature" associated with this, namely "to keep helpers from getting exposed in templates as functions". I'm sure there is a very rationale behind this but I can't see it.
I also read the discussion I found on the group archives (https://groups.google.com/forum/#!topic/mojolicious/Pn0FkpBzO4I) but it didn't help (maybe also because the references to the git repository aren't there any more). A little section in the Cookbock about adding plugins (http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Adding-a-plugin-to-your-application) seems to suggest that it would works if the "basename" of the helper was the name of the plugin creating it (currently the helpers aren't created by a plugin, but that can be quickly done). That being said, I would ask to the collective wisdom of the group: 1. would proxy defined as explained in the cookboock work in templates? 2. is this the recommended way to organize helpers in 'namespaces'? An explication of the rationale behind the decision of allowing "nested" helpers only in controllers would also be interesting to read. Thanks to whomever will help :) -- Leo Cacciari Aliae nationes servitutem pati possunt. Populi Romani est propria libertas. -- 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 https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
