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:
- About Perl Training Australia
- Installing from the CPAN
- Packaging and unpacking with PAR
- autodie - The art of Klingon Programming
- Everything’s an object with autobox
- Building complex expressions
- Practical Exercises
- Devel::NYTProf - Code profiling in the 21st century
- Using Perl::Critic to automatically review your code
- Object Oriented Programming with Moose
- 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. :)