Skip to content

Instantly share code, notes, and snippets.

@keedi
Created December 28, 2011 18:16
Show Gist options
  • Save keedi/1528975 to your computer and use it in GitHub Desktop.
Save keedi/1528975 to your computer and use it in GitHub Desktop.
perldoc-server with plack
#!/usr/bin/env perl
use strict;
use warnings;
use Perldoc::Server;
use Plack::Builder;
my $app = Perldoc::Server->psgi_app(@_);
builder {
enable_if {
$_[0]->{REMOTE_ADDR} eq '127.0.0.1'
} "Plack::Middleware::ReverseProxy";
$app;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment