'It is a capital mistake to theorize before one has data.' -- Sherlock Holmes, "A Scandal in Bohemia"
The mental excursion that led to this blog post started with a report from Olaf Alders that my Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter was generating a false positive on variables used only as defaults in subroutine signatures. After the first cut at fixing this I thought a regression test was in order. I did this by running both unpatched and patched ver…
'A fair jaw-cracker dwarf-language must be.' -- Samwise Gamgee, The Lord of the Rings, II/iii: "The Ring Goes South", as quoted in regcomp.c
, the Perl regular expression compiler.
As you would expect, this category gets you warnings about possibly-problematic regular expression constructions. A couple specific examples are:
Assuming NOT a POSIX class
...
- This warning is about things that look kind of like POSIX character classes, but do not parse that way. The ful…
The re module provides functionality relating to Perl's regular expressions. It is either a module in the sense of potentially exporting stuff into your name space or a pragma in the sense of modifying the behavior of Perl within a lexical scope, or both, depending on how you use
it.
The pragmatic functionality tweaks the regular expressions themselves in various ways:
use re 'taint';
- Within the scope of this pragma, capture buffers…