#!/usr/bin/perl use strict; use warnings; use CGI::Lite; my $cgi = CGI::Lite->new; $cgi->parse_form_data; print "Content-Type: text/plain\n\n"; $cgi->print_data; exit; #### use strict; use warnings; use Plack::Request; my $app = sub { my $env = shift; my $req = Plack::Request->new($env); my %params = %{$req->parameters}; my $body = ''; while (my ($k, $v) = each %params) { $body .= "$k = $v\n"; } my $res = $req->new_response; $res->status (200); $res->headers ({ 'Content-Type' => 'text/plain' }); $res->body ($body); $res->finalize; } #### #!/usr/bin/perl use strict; use warnings; use Plack::Loader; my $app = Plack::Util::load_psgi("light.psgi"); Plack::Loader->auto->run($app);