- or download this
get '/titles' => sub ($c) {
$c->render_later;
...
$c->render(titles => $titles);
})->catch(sub { $c->reply->exception(pop); undef $tx });
} => 'titles';
- or download this
#!/usr/bin/perl
...
);
$async->wait unless $async->ioloop->is_running;
- or download this
$ ./titles_cli.pl
Host: mojolicious.org Status: Connected Title: Mojolicious
+- Perl real-time web framework
Host: metacpan.org Status: Connected Title: Search the C
+PAN - metacpan.org
Host: perlmonks.org Status: Connected Title: PerlMonks -
+The Monastery Gates
Host: www.google.com Status: Connected Title: Google
- or download this
#!/usr/bin/perl
...
</body>
</html>
- or download this
$ ./titles_web.pl get /titles
[Thu Feb 7 08:58:06 2019] [debug] GET "/titles" (842f1ec4)
...
</body>
</html>