Skip to content

Instantly share code, notes, and snippets.

@jeffa
Created April 22, 2015 23:25
Show Gist options
  • Select an option

  • Save jeffa/36dd9e9fbac99bbd95a4 to your computer and use it in GitHub Desktop.

Select an option

Save jeffa/36dd9e9fbac99bbd95a4 to your computer and use it in GitHub Desktop.
Minimal Plack app that interacts with query params
#!/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