For something similar (but not quite easily adapted to other cases, as the server used is too simple) take a look at Test::HTTP::LocalServer, which I use for end-to-end tests of WWW::Mechanize::Shell.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: Forking with a socket
by Corion
in thread Forking with a socket
by natebailey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |