By Chris Nehren (apeiron) from Dahut.pm, Philadelphia.pm, NY.pm
Date: Saturday, 15 January 2011 11:10
Duration: 40 minutes
Target audience: Beginner
Language:
Tags: fork hookers ipc oldschool programming signals sockets unix
This talk is inspired by people coming onto Freenode's #perl (and magnet's #perl-help) and asking about how to do things with threads, assuming it's the only way to do multiprocessing in perl. It's also inspired by an incident on Freenode #perl where I had to explain fork() to someone. More than 20 years ago, perl originated as the "portable distillation of the Unix culture" (a quote from the Camel book). Yet it seems the newer generations of Perl hackers are losing sight of this and instead focusing on threads and ignoring perl's rich heritage. Hopefully this talk will serve to partly fix the situation. Presently the idea is to develop a small, preforking Web server that illustrates as many Unixisms as possible: forking, signal handling / sending, stats available via a Unix socket, and other goodies. The talk is aimed at the Perl beginner who either hasn't committed perlipc to memory, or who wants a concrete example of all the concepts working in close formation. However, more advanced programmers who haven't dug into Perl's Unixy bits should also walk away having learned something new.