views:

202

answers:

3

It will be better if this solution is based on HTTP protocol.

+3  A: 

Checkout HTTP::Daemon in CPAN. It will give you the basics of a server. You can then over-ride methods to handle your HTTP.

Alternatively, try HTTP::Server::Simple although that module doesn't seem as mature as the first one.

Finally, you could take a look at Net::Server, which is a more general approach.

Hissohathair
I don't know why I didn't find HTTP::Daemon myself on CPAN... It seems close from what I was looking for, I will give it a try... Thanks !
sebthebert
A: 

HTTP Perl Client implementation are slow (one million CPU cycles just for HTTP headers mangling). (If you ask for fast they bane you. Asking for fast implementation is strongly forbidden.) May be try WWW::Curl or better LWP::Curl which seems in early stage but promising. At servers side use apache2 with mod_perl. If you don't want HTTP use PlRPC seems very promising.

Edit: If you note it they down vote you. Of course.

Hynek -Pichi- Vychodil
Perhaps you're getting downvoted for being incorrect. I've been active in the Perl community for many years and have yet to see anyone who is demonstrably using the stuff complain about its performance. I've also used LWP quite a bit myself and it's always been fast enough, even on old hardware.
Dave Sherohman
Your requirements must be different from mine when you doesn't take care if spend one million CPU cycles just for mangle http headers (500us at 2GHz CPU). Mines are different, that is life.
Hynek -Pichi- Vychodil
+2  A: 

With IO::All you can make a client/server in about 2 lines of code (see link).

dsm
I didn't know this module at all... Seems interesting...
sebthebert