spatterson has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow monks

I'm starting to work on a tcp listening daemon in perl, and I'm wondering which of the various Daemon-ish modules people would suggest using these days.

So far I've found IO::Socket::INET mentioned in one of the O'Reilly books (from when 5.004 was current), Net::Server, and Net::Daemon. I could use any of these (or others) but I'm not used to writing perl services so I thought I'd ask for the wisdom of the monastery.

Update: The eventual intent (yes, this is a pet project) is to make an imap server (single user) to access local maildir mailboxes.


just another cpan module author

Replies are listed 'Best First'.
Re: Which module to create a tcp daemon?
by tirwhan (Abbot) on Nov 15, 2005 at 16:26 UTC

    One of the things I like about the Net::Server family is that it very easily allows you to move from a single-threaded to forking or pre-forking model. So you can concentrate on the things that your code is supposed to do with the network connection and not have to worry too much about the scalability or flexibility of your daemon.

    I think the choice largely depends on how much work you want to do yourself and how much you want to get from preexisting code. You've not told us what your daemon is supposed to do, so it's hard to give advice.


    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
Re: Which module to create a tcp daemon?
by philcrow (Priest) on Nov 15, 2005 at 16:04 UTC
Re: Which module to create a tcp daemon?
by zentara (Cardinal) on Nov 15, 2005 at 17:07 UTC
    I'll mention Net::EasyTCP, which I like. It has some features like built-in encryption and port passwords. It is a low-use server however.

    I'm not really a human, but I play one on earth. flash japh