Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 37486
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Matt Kraai <kraai [...] ftbfs.org>
Subject: From Debian: Does not detect interpolations preceded by \\
Date: Mon, 07 Jul 2008 08:42:57 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
This is a copy of the Debian bug report at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480248. Package: libperl-critic-perl Version: 1.082-1 If the ValuesAndExpressions::ProhibitInterpolationOfLiterals policy is enabled, it does not recognize that variables preceded by \\ are interpolated (e.g., "\\$foo"). -- Matt
On Mon Jul 07 09:43:52 2008, clonezone wrote: Show quoted text
> This is a copy of the Debian bug report at http://bugs.debian.org/cgi- > bin/bugreport.cgi?bug=480248. > > Package: libperl-critic-perl > Version: 1.082-1 > > If the ValuesAndExpressions::ProhibitInterpolationOfLiterals policy is > enabled, it does not recognize that variables preceded by \\ are > interpolated (e.g., "\\$foo"). >
To really do this right, we will need to add real parsing of interpolated strings to P::C or PPI. I swear I saw a CPAN module recently that does that, but I can't find it again right now.
I noticed this too. Perhaps the regexp m{ (?<!\\) [\$\@] \S+ }mx could match any even number of backslashes, instead of only zero. I get some joy from /(^|[^\\])(\\\\)*[\$\@]\S+/ avoiding a variable length negative look-behind assert ...
Working on this. Tom Wyant
Think this is done, as revision 3074. Tom Wyant
This has been completed and released in Perl-Critic-1.097_002. http://search.cpan.org/~elliotjs/Perl-Critic-1.097_002 Thank you for submitting this ticket.