tags:

views:

341

answers:

4
+16  A: 

chromatic is in the process of writing a Modern Perl book which is available for preview in his Github account. The recent Catalyst book by Kieren Diment and Matt Trout covers several modern perl practices and the current "Enlightened Stack" as Matt I believe calls it.

There is also work going on for a Moose book, but I doubt it will be available before next summer even if the authors were able to focus on it full time. For learning Best Practices, as long as you take it with a huge grain of salt the discussion in Damian's Perl Best Practices is worth reading. I wouldn't recommend his practices are best, but they illuminate where the conversation points are and you can google around for people's comments on it. The biggest problem I personally had was the OO suggestions it had, and it led me to find Moose which I adore.

Finally, interact with the community. Join a mailing list or three, an irc channel or two, and blog regularly about what you're learning. The Perl community is generally supportive of helping people who really are interested in learning find the tools they need.

perigrin
For some reason, clicking on the github link gives a "File Not Found" page even though the URL seems to be correct.
Sinan Ünür
Yeah, Stack Overflow's Markdown engine is mangling the URL. I tried to fix it, but it's still getting mangled. The URL, for anyone else out there, is http://github.com/chromatic/modern_perl_book
Benjamin Pollack
On the topic of modern Perl blogs, the Ironman Blogging Competition (http://ironman.enlightenedperl.org/), held by the Enlightened Perl Organisation is an excellent way to find blogs that deal with the post-modern aspects of Perl and highlights modules and techniques that aren't (yet) in any books.
jeekl
+11  A: 

Learning Perl, 5th Edition is current up to 5.10. There's even a chapter for the smart match operator, just like you want, in addition to the other new features that a beginner will want. If you want to start learning Perl, that's the book to use. Once you get through it, move onto whatever else you want to do. I'll have Effective Perl Programming, 2nd Edition out around the start of spring too. That will be current up to 5.10.1 (and maybe a little farther since we use at least one 5.12 feature in some code).

You really don't want a book on Catalyst or Moose. Anything you read will be out of date because those projects have a high velocity and the practices change pretty quickly. You're going to need to learn the basics before you dive into the advanced topics, anyway.

To continue as a programmer, you're going to have to get used to not depending on books. I can't write them as fast as stuff changes, so you have to learn from the documentation too. That's just how life is.

brian d foy
I've had enough experience programming that I appreciate your comment about books being immediately out-of-date, but that cuts both ways: if the book's immediately out-of-date, then so's the code I wrote last year, and that can get incredibly frustrating in and of itself. It's nevertheless useful to know that these frameworks are so much in flux that anything I learn is likely to be immediately invalidated.
Benjamin Pollack
Well, your code is only out of date if you hitched your wagon to the latest fad. Stop chasing the fads. :) If you stick around long enough you'll see that if you put off some hot topics for a year or so, you save yourself a lot of work when people change to the latest cool thing. For what it's worth, most of "modern Perl" works with any Perl within the last five years.
brian d foy
In defense of Catalyst, the project actually tries *really* hard not to break running code. Quite a few apps written as far back as Catalyst 5.3 still run on 5.8, or run with the smallest of modifications. *Best practices* change, but the fundamentals don't. The latest book is also very forward-looking.All that said, you *don't* need a Catalyst book. Worry about learning Perl instead. Read *any* book from 2001 or later, read perldocs, read code, talk to people online!
hobbs
Yes, what Hobbs said.
brian d foy
+2  A: 

I would recommend the mentioned Learning Perl 5th Edition followed by Damian Conway's Perl Best Practices (also previously mentioned).

I would like also point you to the PBP Module Recommendation Commentary that discusses the current "community view" of the modules discussed in Perl Best Practices.

Despite what is discussed (or not) at this site, two of my favorite Perl Best Practice recommendations are Data::Alias and Smart::Comments (Even though Smart::Comments is a source filter, you can easily remove it before sending your code to production. It is great for debugging.).

molecules
+4  A: 

There was an excellent talk at OSCON by Paul Fenwick on "Awesome Things You've Missed in Perl" where he gives several code examples and usage tips for using Modern Perl.

The talk was recorded, but it's not on the list of recordings yet: http://www.oscon.com/oscon2010/public/schedule/proceedings

Here are some other great talks worth checking out that also provide examples of Modern Perl:

And finally (not from OSCON):

Larry Wall speaking at Google

mmmpork
+1 Thanks, I did not know OSCON was providing video and PDFs.
molecules