Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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?

Comment on Re: Stopping an HTTP::Server::Simple server
Select or Download Code

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 musing on the Monastery: (8)
As of 2015-11-25 15:58 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (682 votes), past polls