1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/local/bin/perl use warnings; use strict; use Mojolicious::Lite; get '/my_site' => sub { shift->render(title => 'My_Site'); } => 'my_site'; app->start; __DATA__ @@my_site.html.ep <html> <body> <h3>Hallo</h3> </body> </html>
./test_mojo.pl daemon --reload
1
2
3
4
5
Thu May 12 22:27:16 2011 debug Mojolicious::Plugin::RequestTimer:22 [26557]: GET /my_site (Mozilla/5.0 (X11; U; Linux x86_64; de-DE; rv:1.9.1.16) Gecko/20110302 Iceweasel/3.5.16 (like Firefox/3.5.16)).
Thu May 12 22:27:16 2011 debug Mojolicious::Routes:376 [26557]: Dispatching callback.
Thu May 12 22:27:16 2011 debug Mojolicious::Plugin::EplRenderer:65 [26557]: Template "my_site.html.ep" not found.
Thu May 12 22:27:16 2011 debug Mojolicious::Plugin::EplRenderer:65 [26557]: Template "my_site.html.ep" not found.
Thu May 12 22:27:16 2011 debug Mojolicious:211 [26557]: Waiting for delayed response, forgot to render or resume?
get '/my_site' => sub { shift->render(title => 'My_Site'); } => 'my_site';