Winter Storm Juno to venture out to Albany Perl Mongers' technical meeting in East Greenbush. Our special guest star Jeff Thalhammer had agreed to teleconference in from San Francisco to talk us through Perl::Critic. This arrangement worked pretty well for us, with Jeff able to chat with the small number of us that had braved the storm and answer our questions. The only flaw with the setup was Jeff wasn't able to try the pokemon cupcakes I'd baked. Bring on cupcake-over-ip technology is what I say. I've been using Perl::Critic for many years now, and I wasn't sure I would get much out of the technical meeting, but I was very wrong. Jeff was able to give several tips, answer questions, and point out a bunch of improvements that I was unaware of since I first started using Perl::Critic years ago.Last night I braved
onlyThe biggest win for me was learning about using the only option directly in a
.perlcriticrcitself. This allows you to only run the rules specified in the critic file rather than any installed rules and is awesome for continuous integration test suites running off our in-house
.perldcriticrcbecause if a new rule gets installed (due to an update our distribution dependencies) we don't start automatically using it (and failing it) without some sort of review.
verboseThe various levels of verbose output that Perl::Critic's verbose options now provides are very helpful. Bumping the output to level 8 (with
--verbose=8) helpfully tells you the name of the policy that you're violating, which is useful if you want to disable it with a
## no critic (...), or tweak the
.perlcriticrcor simply read the documentation for the module so you can better understand what the policy is complaining about
profile-protoMy ancient personal
.perlcriticrcfile is getting a bit long in the tooth. Not only has my coding style changed over the many years as I've learned more about Perl, but Perl::Critic itself has improved introducing new policies both in the core distribution and on the CPAN itself. This is why I was excited to learn about the profile-proto which can spit out a fully-documented default
Let's Go ShoppingJeff took us on a brief shopping tour of the CPAN to show us some of the cool new policies that are available. Some standouts include:
- Perl::Critic::Moose are a bunch of policies for dealing with Moose classes Dave Rolsky just released.
- Perl::Critic::Tics and and Perl::Critic::Bangs are a bunch of things that bother Ricardo Signes and Andy Lester that are worth looking at.