views:

131

answers:

2

Are there links, materials, or books about network programming with Perl that are relevant to 2010? I saw some books on programming the network with Perl are very old (about a decade) and the tutorials on the internet are also old and using old modules.

Could someone provide a good reference about programming sockets and network layer/application layer protocols with Perl that are updated to 2010?

+3  A: 

This task really demands an asynchronous framework: pretty much everyone uses POE these days. I hate it because for me it doesn't look like Perl. It looks like its own special silly premature-optimized language. Anyway, you can find more info on cpan's docs about poe.

The internals of POE are weird, and POE does rather silly stuff like statically index the contents of @_ for "speed". A POE-component looks like a little brick of voodoo-dung right in the middle of your code. You might like it, give it a shot. If you have to debug it or expand POE::Kernel you might want to look for employment elsewhere.

There is a growing alternative too: AnyEvent. I'd look at it first. It does things massively different and is a much thinner layer that doesn't want to infest your whole application.

Links:

Evan Carroll
I thought I was the only one who hated POE. :)
friedo
I prefer AnyEvent over POE, but Evan's commentary on POE is completely wrong. I would edit it, but then there's nothing left.
jrockway
re: jrockway, Argumentum ad lapidem. Who am I to have the opinion. I just attempted the most progressive fork of POE: http://github.com/EvanCarroll/POE (quite frankly I feel you're riding the mst and co., bandwagon)
Evan Carroll
What is different about your fork? How does it compare with the Moosified version you announced last spring?
daotoad
POE is a monster. Its strength is its wealth of modules, but if you don't need any particular one, or if AnyEvent also provides a similar module, then by all means go for AnyEvent.
Leon Timmermans
How is anything in this answer relevant to the question? There's nothing that suggest the asynchronous framework that sends Evan off on a POE rant. If you don't like POE, fine, but don't destroy your point "AnyEvent: I'd look at it first" by hiding it in the middle of the crap pile.
brian d foy
re: brian d foy: I find it substantiative to discuss the more oft used framework and why I don't like it, and the growing alternative of AnyEvent. I find the phrase `programming sockets and network layer/application layer protocols with Perl that are updated to 2010` to be a direct reference to an asynchronous framework.
Evan Carroll
+2  A: 

Although Lincoln Stein's Network Programming with Perl is a bit old, the content is still mostly good. Network programming at that level hasn't changed that much in the last couple of decades. If you want to learn to play with sockets, that's the book to get to get you started.

However, Perl at the socket level does that same thing the C libraries do. There might be some nice interfaces around it, but look under the interface and you'll see the same things.

brian d foy
Right, but I think the qualification of `2010` was in reference to an API that wasn't implemented in C, and how people are approaching the problem today.
Evan Carroll