Mojolicious::Liteでルーティングしてみる

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/env perl
use Mojolicious::Lite;

get '/' => sub {
    shift->render(text => q{Hello World!});
};

get '/foo' => sub {
    my $c = shift;
    $c->render(text => q{Foo!});
};

app->start;
1
2
3
4
5
6
#!/usr/bin/env perl
use Mojolicious::Lite;

get '/' => sub {
    shift->render(text => q{Hello World!});
};
1
2
3
4
get '/foo' => sub {
    my $c = shift;
    $c->render(text => q{Foo!});
};
1
app->start;
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy