[AnnArbor.pm] Seeking advice on using Perl in a professional way

Harold Tessmann htessmann at control-tec.com
Thu May 4 12:34:53 PDT 2017


Hi from YpsiArbor/Allen Park,

I'm looking to productionize some Perl scripts, and as such, I want to
adopt more structure than I use in disposable scripts. These scripts would
be used within the bounds of my employer, not released to the general
public (with maybe one or two exceptions). I know that TIMTOWTDI, but I
like the “sometimes consistency is not a bad thing either” extension when
it comes to common problems such as command-line option parsing, and the
perldocs don’t go in depth on what people use in the real world. I’m
looking for advice on topics including, but not limited to:

• Modern Perl: I like it in general, and I can install it on my team’s
machines. Are there reasons I shouldn’t use it?

• Does anybody have a suggestion for a good blank script template? For
instance, I know I want "use Modern::Perl 'version';" or "use
warnings/strict;", etc., but there’s probably other things I would want in
a basic script. I’ve handled this in a sort of ad-hoc manner, growing new
scripts based on what I learned from the old, but I’d like to build a good
template once and be done with it. I’d also like the template to include
documentation, and that raises more questions. Is there a reason to put my
pod block near the top vs. the bottom? Getopt::Tiny seems nice, including a
feature to automagically build a usage block—should I use that or is there
a reason to avoid it? Or is there a better option parser?

• Do you run Perl::Critic on your code? I know I’ll disable some of the
rules, but is it more hassle overall than it’s worth? Similarly, PerlTidy:
it seems useful for generating HTML versions of documentation, but I write
code in a very precise way, such it would take more time to configure it
than I would save in reformatting.

• Thus far I haven’t built anything complicated enough to warrant figuring
out an object library; I can get by with basic hash-based structures. I’ve
read a bit about Moose and Dancer: how do they compare? And what else
exists that I should consider?

Any advice is greatly appreciated.

Thanks,
Harold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/annarbor-pm/attachments/20170504/7e1a574e/attachment.html>


More information about the AnnArbor-pm mailing list