notes.jays.net

Modern Perl

Originally posted to deafferret on 2012-06-15.

This talk was awesome! Putting the ideas together, a hands on tutorial of modern Perl. Big kudos to Jacinta Richardson. I’m going to hijack ODLUG meetings for months to come with these materials. :)

Download their 71 page .pdf off their talk page. It’s a great resource. Table of contents:

  1. About Perl Training Australia
  2. Installing from the CPAN
  3. Packaging and unpacking with PAR
  4. autodie - The art of Klingon Programming
  5. Everything’s an object with autobox
  6. Building complex expressions
  7. Practical Exercises
  8. Devel::NYTProf - Code profiling in the 21st century
  9. Using Perl::Critic to automatically review your code
  10. Object Oriented Programming with Moose
  11. Testing your module

Incidentally, here’s the 5 minute one-liner I wrote for the exercise on page 21:

perl -Mautobox::Core -E 'my $j = int(rand(100)); while (<>) { chomp;
if ($_ == $j) { say "you win!"; exit } say $_ > $j ? 'lower' : 'higher'}'

It works, but completely fails to actually use autobox::Core, which was the original point. Oops. :)