the answer is Yuki Kimoto > Mojolicious-Plugin-AutoRoute >
Mojolicious::Plugin::AutoRoute .
On Monday, March 13, 2017 at 7:26:39 PM UTC-7, iaw4 wrote:
>
>
> dear M experts----beginner's question.
>
> I like the structure and simplicity of M Lite even more than I like that
> of M (at least for now). Of course, Lite wouldn't work with more than a
> few routes. what I would like is to have my code be together in one file
> with its template, and store it in the unix file structure that gives it
> its name. (this is not to argue that this is a better way to do this; just
> a personal preference. it makes it easy to look at the URL and find all
> associated source code.)
>
> so, for example, I may want to store in
>
> /student/workonme:
>
> use Mojolicious::Lite;
> use mystuff;
>
> # Route is determined by the file name now, so
>
> # get or post '/student/workonme' =>
>
> sub {
> my $c = shift;
> $c->stash(one => 23);
> $c->render(template => 'magic', two => 24);
> };
>
> app->start;
> __DATA__
> @@ magic.html.ep
> The magic numbers are <%= $one %> and <%= $two %>.
>
> I don't know how to distinguish between gets and puts in this sort of
> organization (yet). now, when a URL request arrives, M would just look it
> up in the unix file structure.
>
> if this functionality exists, could someone please point me to it?
> pointers appreciated.
>
> regards,
>
> /iaw
>
>
--
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.