Skip to content

Instantly share code, notes, and snippets.

@yannk
Created October 15, 2009 07:14
Show Gist options
  • Save yannk/210746 to your computer and use it in GitHub Desktop.
Save yannk/210746 to your computer and use it in GitHub Desktop.
package Plack::Server::Standalone::Accept;
use strict;
use warnings;
use base qw(Plack::Server::Standalone);
use IO::Socket::INET;
sub setup_listener {
my $self = shift;
open my $socket, "<&=0"
or die "Cannot open stdin: $!";
bless $socket, "IO::Socket::INET";
$self->{listen_sock} = $socket;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment