Archive for the ‘Perl Best Practices’ Category

PBP: 056 Localizing Punctuation Variables

Monday, November 10th, 2014

The PBP suggests using local on any changes to one of the global punctuation variables.

(more…)

PBP: 055 Punctuation Variables

Thursday, November 6th, 2014

The Best Practice is to ‘use English’ for the uncommon punctuation variables.  This has been a hard thing for me to get used to, but I have found it useful. (more…)

PBP: 054 Initialization

Monday, November 3rd, 2014

Mr. Conway suggests that you initialize any variable you localize. (more…)

PBP: 053 Localization

Thursday, October 30th, 2014

The PBP tells us to localize changes to package variables.  This is usually good sense, and prevents your changes from leaking out and messing with other things. (more…)

PBP: 052 Package Variables

Monday, October 27th, 2014

The PBP suggests avoiding package variables.  I almost can’t think of a reason to use one, so support this suggestion. (more…)

PBP: 051 Lexical Variables

Thursday, October 23rd, 2014

Global Variables; Just Say No.  Well, the PBP’s a little more lenient than that, and actually easier to follow by suggesting, “Avoid using non-lexical variables.” and admitting there are some times you just need a package or global variable. (more…)

PBP: 050 List Membership

Monday, October 20th, 2014

The PBP suggests using the right, fast, tools to search for strings in lists.  Who wouldn’t? (more…)

PBP: 049 Lists

Thursday, October 16th, 2014

This best practice is a simple suggestion: Put every raw list in parenthesis.  It’s good. (more…)

PBP: 048 Low-Precedence Operators

Monday, October 13th, 2014

The best practice is not to mix low and high precedence boolean operators.  This is both good and bad, but following the rule can save your sanity. (more…)

PBP: 047 Thin Commas

Thursday, October 9th, 2014

The PBP cautions us not to use commas to separate and sequence statements.  I think this is good advice most of the time. (more…)