CC: | setitesuk [...] gmail.com |
Subject: | Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters |
Hi,
Apologies if this has already been flagged, but I couldn't locate
something like it.
ProhibitEscapedMetacharacters disallows escaping . as in
my ($dtfn) = $fn =~ m{([[:lower:]\d_\-\./]+)}mixs;
However, trying to turn it into a character class as follows
my ($dtfn) = $fn =~ m{([[:lower:]\d_\-[.]/]+)}mixs;
Breaks the code, and the only POSIX option I can find close to this is
[:punct:]
however, it is important that I only match a literal ., in case of
problems if it matches other punctuation.
This is forcing us to use a ## no critic
(RegularExpressions::ProhibitEscapedMetacharacters) on the line, in
order to ensure that we pass PerlCritic
I hope that you will have time to look at this.
Cheers
Andy