Mojolicious::Liteでハローワールド

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

get '/' => sub {
    shift->render(text => q{ハローワールド!});
};

app->start;
1
2
#!/usr/bin/env perl
use Mojolicious::Lite;
1
2
3
get '/' => sub {
    shift->render(text => q{ハローワールド!});
};
1
get('/', sub { ... });
1
2
my $c = shift;
$c->render(text => q{ハローワールド!});
1
app->start;

Comments

comments powered by Disqus