by ra88it · 8y ago · 0 comments
I’m assuming MetaCPAN is written in Perl, at least in part. But I’m on mobile and I don’t want to research right now; I could be wrong.
Edit: also, 2005 era Python or Ruby, for a website, would likely be unpleasant to maintain as well.
Edit2: I know you’re not a Perl hater; I’m not an advocate; just playing the devil’s advocate.
The basic idea is simple though. Use strict. Use warnings. Use new features and best practices modules (Task::Kensho[2] an help here) when them make sense (e.g. Moose/Moo). Be aware at least what PBP[3] is, and if you feel so inclined, use Perl::Tidy and/or Perl::Critic (even if your own defined subset of rules) to give yourself an idea of what is considered good practices (and when to throw them our for that elegant line or two, just don't forget to comment it so you don't confuse yourself when you see it months/years later). Basically, if you care about the code you write, you should find yourself gravitating towards writing Modern Perl anyway, and the speed at which it happens is largely determined by your exposure to the Perl community at large.
My own personal set of best practices means almost always using something like Function::Parameters or Kavorka, and possibly Moops.[4]
1: https://metacpan.org/pod/Modern::Perl
2: https://metacpan.org/pod/Task::Kensho
Uhm, I can't see Catalyst listed in the web development section... Has it fallen out of grace ?