Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resources for getting started on "modern" Perl

Tags:

perl

moose

After having heard about new parts of the Perl ecosystem, such as Moose, DeclareX, and Catalyst, I thought that it'd be nice to take a look at Perl. Unfortunately, all of the introductory material I can find targets Perl 5.8 or 5.6, and knows nothing about these newer frameworks—let alone features introduced in recent Perl versions, such as the ~~ operator. What resources are available for someone interested in coming to Perl fresh, and wanting to learn the current best-practice way to do things right from the get-go?

While I can read the 3rd edition of the camel book, then work the rest of my way through piles of CPAN documentation and the like, I'd tremendously appreciate a tutorial that doesn't force me to learn a bunch of deprecated ways to do things, just to turn around and unlearn them again when I read a reference manual. Real-world code that's well-documented and uses some of these newer corners of Perl would also be wonderful.

like image 468
Benjamin Pollack Avatar asked Nov 18 '09 20:11

Benjamin Pollack


2 Answers

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.

like image 175
perigrin Avatar answered Oct 07 '22 19:10

perigrin


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.

like image 34
brian d foy Avatar answered Oct 07 '22 17:10

brian d foy