Background : I am now using the Mojolyst plugin, which makes it possible to code each URL into one file that contains both code and template, similar to catalyst or php routing. it's basic use was explained by Stefan as follows:
[1] obtain the example with the updated Mojolyst.pm plugin <https://gist.github.com/kraih/2149176#gistcomment-2045769>. at the end of the wiki. [2] the file tree is ./myapp.pl ./lib/MyApp/Controller/Foo.pm ./lib/MyApp/Controller/Bar.pm ./lib/Mojolicious/Plugin/Mojolyst.pm ---- alas, how would I refer to helpers now? For example: package MyApp::Controller::Bar; use Mojolicious::Lite; helper testhelper => sub { return "<h1> TESTHELPER IS WORKING </h1>\n"; }; get '/test' => sub { my $self = shift; $self->render('test'); }; 1; __DATA__ @@ test.html.ep Just some test template. <%== testhelper() %> I have tried adding package id in the call, but it is not being picked up. -- 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.
