<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1493920506048_25121">Partly, it depends on the target environment you're going to deploy to and how much control you have over that.</div><div id="yui_3_16_0_ym19_1_1493920506048_25120">How many different servers are we talking about in all?  What OS and system perl version are they running?  MS Windows?<br></div><div id="yui_3_16_0_ym19_1_1493920506048_25119">Can you easily install the modules you want on those servers?  Binary (xs) modules or pure perl?  <br></div><div id="yui_3_16_0_ym19_1_1493920506048_25629">Presumably you'd want to install those modules to be local to a user acct (local::lib), rather than into the system perl itself.<br></div><div id="yui_3_16_0_ym19_1_1493920506048_25118">Do you want/need to create a local perl environment (your own compiled perl, rather than the system perl; perlbrew, plenv)?</div><div id="yui_3_16_0_ym19_1_1493920506048_25117"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25016">The answers to the above questions may have a large influence on the approach you take.  For small-medium sized scripts on large numbers of diverse servers, sticking with the core modules (e.g. Getopt::Std, Getopt::Long) and pure perl may be just fine.  If you need binary modules, you'll have to take a more complicated approach.<br></div><div id="yui_3_16_0_ym19_1_1493920506048_25018"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25015">In any case, warnings/strict is a must in production code.  Hash-based native objects are fine for smaller projects.</div><div id="yui_3_16_0_ym19_1_1493920506048_25907">If you're going modern, then Moose.<br></div><div id="yui_3_16_0_ym19_1_1493920506048_25014"><span></span><br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1493920506048_24795" style="display: block;">  <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1493920506048_24794"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1493920506048_24793"> <div dir="ltr" id="yui_3_16_0_ym19_1_1493920506048_24998"> <font id="yui_3_16_0_ym19_1_1493920506048_25031" size="2" face="Arial"> <hr id="yui_3_16_0_ym19_1_1493920506048_25083" size="1"> <b id="yui_3_16_0_ym19_1_1493920506048_25342"><span style="font-weight:bold;" id="yui_3_16_0_ym19_1_1493920506048_25341">From:</span></b> Harold Tessmann <htessmann@control-tec.com><br> <b><span style="font-weight: bold;">To:</span></b> AnnArbor-pm@pm.org; Detroit-pm@pm.org <br> <b id="yui_3_16_0_ym19_1_1493920506048_25340"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1493920506048_25339">Sent:</span></b> Thursday, May 4, 2017 3:36 PM<br> <b id="yui_3_16_0_ym19_1_1493920506048_25080"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1493920506048_25079">Subject:</span></b> [AnnArbor.pm] Seeking advice on using Perl in a professional way<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1493920506048_24792"><br><div id="yiv9570834890"><div dir="ltr" id="yui_3_16_0_ym19_1_1493920506048_24791"><div id="yui_3_16_0_ym19_1_1493920506048_24997">Hi from YpsiArbor/Allen Park,</div><div id="yui_3_16_0_ym19_1_1493920506048_24996"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25032">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:</div><div id="yui_3_16_0_ym19_1_1493920506048_25033"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25034">• 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?</div><div id="yui_3_16_0_ym19_1_1493920506048_25035"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_24842">• 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?</div><div id="yui_3_16_0_ym19_1_1493920506048_24830"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_24790">• 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.</div><div id="yui_3_16_0_ym19_1_1493920506048_25696"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25062">• 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?</div><div id="yui_3_16_0_ym19_1_1493920506048_25061"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25060">Any advice is greatly appreciated.</div><div id="yui_3_16_0_ym19_1_1493920506048_25059"><br></div><div id="yui_3_16_0_ym19_1_1493920506048_25058">Thanks,</div><div id="yui_3_16_0_ym19_1_1493920506048_25695">Harold</div>
</div></div>_______________________________________________<br>AnnArbor-pm mailing list<br><a ymailto="mailto:AnnArbor-pm@pm.org" href="mailto:AnnArbor-pm@pm.org">AnnArbor-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/annarbor-pm" target="_blank">http://mail.pm.org/mailman/listinfo/annarbor-pm</a><br><br><br></div> </div> </div>  </div></div></body></html>