Created
April 22, 2015 23:25
-
-
Save jeffa/36dd9e9fbac99bbd95a4 to your computer and use it in GitHub Desktop.
Minimal Plack app that interacts with query params
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env plackup | |
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use Plack::Request; | |
| use Plack::Response; | |
| my $app = sub { | |
| my $req = Plack::Request->new( shift ); | |
| my $query = $req->parameters; | |
| my $res = Plack::Response->new( 200 ); | |
| $res->body( '<pre>' . Dumper( $query ) . '</pre>' ); | |
| $res->finalize; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment