74 points · by hmade · 15y ago · 29 comments
While Modern Perl and Perl Best Practices seem to be now the defacto texts to follow in this field, I highly suggest to also supplement your learning of good Perl by reading Perl Medic by Peter Scott. While its main purpose is how to maintain a legacy codebase, its an absolute gem when it comes to what type of Perl code you should be churning out.
See http://www.slideshare.net/thaljef/perl-critic-in-depth for the slides to a presentation that I saw this week on it, and http://www.slideshare.net/search/slideshow?searchfrom=header... for other presentations.
Modern Perl is a revelation! While the first hundred pages are a crystal-clear recap of the basic language (and I found at least a couple of things there that I didn't really know about), the chapters on modern object-orientation (using Moose), exception handling, testing, maintainability, and what features in Perl 5 to avoid are all pithy, to the point and well-argued.
If you're a (self-exiled) Perl coder like I was, give this (e)book a read and see if you might jump back in. I have - and would second frameworks like Perl Dancer as fantastic examples of what the Perl community is up to these days.
Follow up/related question: She mentions that the slides would be uploaded online. Where?
I wrote a pragma called "no nonsense" that is a little saner:
http://search.cpan.org/~jrockway/nonsense-0.01/lib/nonsense....
You say "no nonsense" at the top of the lexical scope, then you get strict and warnings, the true value required at the end of the module is automatically added, and any non-method subroutines you import are made un-callable as methods. That's it.
(I personally don't use this, because it's a little too cute. I don't mind saying "use Moose; use true; use namespace::autoclean;" at the top of my classes.)
I see it as an experiment as to where Perl 5 could be. Even though I might not use it outside of personal projects, it's still useful.
That's not a bad idea for personal projects if it does save you time. Otherwise I'm not so sure. Experimenting is good though.
It probably would have been a bit more lighthearted if I replaced Python with Perl 6 in my previous post.