Lance Wicks
Kiwi,
Judoka,
Geek,
Husband
Daddy!

JudoGeek Blog

Perl baby! 

So in my $dayjob, I have for the last couple of months been working almost exclusively in Perl development.

I have mainly been doing PHP web stuff for the last couple of years, so it's been interesting looking at Perl again. Coming back to Perl has reminded me how nice a language it is to work in and how many powerful tools it has.

What is interesting coming back to it is noticing how much talk there is about how Perl has lost ground to PHP, Python, Ruby etc. There is the Modern Perl movement and a push currently to up the social media war. For example the "Ironman" challenge trying to get modern articles on Perl online.

What has not changed is Perl 6 is still vapourware prety much.

Anyway...

So Perl Best Practices is great, especially when coupled with PerlCritic.
My tendency is to work like this:

1. Run PerlTidy on whatever code I am working on.
I have some local standards setup to match the style of the team I work with.

2. Hack away
Preferably I "try" to start by writing a t test file or a script that automates testing the script I am working on when the code is not a module. So TDD with unit tests where possible and TDD with regression testing when a script.
I'd love some guidance in this area if anyone wants to comment.

3. Run the code through PerlTidy again

4. Run the code through PerlCritic.
I have this setup at level 3 or 4 currently. Depending on how clever I am feeling or how messy the code is, I tend to run PerlCritic over and over at different levels and try and fix up as many things as I can.

5. Commit the code and get a colleague to review the code.

6. Fix the changes recommended and send it back fro review again until it passes.

7. Merge it into the main codebase.


It's been great to get back into Perl and I shall post more about it over the coming days, weeks, months. :-)

P.s. If you are interested in Learning Perl, you should check out Gabor Szabo's Beginner Perl Maven course on Udemy.

Comments

Comments are not available for this entry.