Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Stopping an HTTP::Server::Simple server

by Corion (Pope)
on Oct 26, 2007 at 20:49 UTC ( #647492=note: print w/replies, xml ) Need Help??

in reply to Stopping an HTTP::Server::Simple server

I've done something similar in the time before HTTP::Server::Simple with Test::HTTP::LocalServer.

I use a special URL to tell my server that I'm done with it, normally /quit.

As I launch the server as a child process, I have it output the URL where it can be found, so I get an "always unused port" there.

As an aside, why are you launching a server at all, when you can just require the server module and call the ->handler() or ->handle_request() yourself?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647492]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2016-10-20 19:47 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (280 votes). Check out past polls.