Tatsuhiko Miyagawa <miyagawa@gmail.com> writes: > % cat > app.cgi > package main; > > my $app = sub { > return [ 200, [ "Content-Type", "text/html" ], [ "Hello" ] ]; > }; > Plack::Handler::CGI->new->run($app); > > % cat `perldoc -l Plack::Handler::CGI` app.cgi > app_bundled.cgi Plack/Handler/CGI.pm ends with __END__ and a pod section, effectively causing the contents of app.cgi to be ignored. But we can fix that ;) > Now app_bundled.cgi works as a CGI script, no dependencies out of the > core (Plack::Handler::CGI only requires strict.pm and IO::Handle). FTP > that file, chmod +x it and it works as a CGI script on any host. Right. Now this is really helpful. > $ cat > myapp.pl > use Mojolicious::Lite; > get '/' => sub { > my $self = shift; > $self->render(text => "Hi"); > }; > app->start; So is this. Thanks. -- JohanThread Previous | Thread Next