Thursday, September 2, 2010

I need a few lines of nasty Perl 5 code.

I am writing a talk for beginning Perl 5 programmers covering how to read a line of code and I need a few nasty lines that are fairly self contained. These should be normal lines of code (no obfuscation), they just need to have a lot going on in them. Things involving multiple maps with complex bodies would be good. If you have one or more such beasts, would you leave a comment with them?

Web::Simple's Web::Simple::DispatchParser::_parse_spec has some good tricks like do{} blocks, hash slices, push-ors, and other niceties. It was created by mst for the "Antiquated Perl" talk, after all..