[BACK]Return to dudelicious.pl CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo / bin

Annotation of todotxt/Text-Todo/bin/dudelicious.pl, Revision 1.2

1.1       andrew      1: #!/usr/bin/env perl
                      2:
1.2     ! andrew      3: package Dudelicious;
        !             4:
        !             5: BEGIN { use FindBin; use lib "$FindBin::Bin/mojo/lib" }
        !             6:
1.1       andrew      7: use Mojolicious::Lite;
                      8:
                      9: get '/' => 'index';
                     10:
                     11: get '/:groovy' => sub {
                     12:     my $self = shift;
                     13:     $self->render_text($self->param('groovy'), layout => 'funky');
                     14: };
                     15:
                     16: app->start;
                     17: __DATA__
                     18:
                     19: @@ index.html.ep
                     20: % layout 'funky';
                     21: Yea baby!
                     22:
                     23: @@ layouts/funky.html.ep
                     24: <!doctype html><html>
                     25:     <head><title>Funky!</title></head>
                     26:     <body><%== content %></body>
                     27: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>