CC: | Heiko <heiko [...] hexco.de> |
Subject: | ProhibitStringyEval doesn't handle "expressions giving values". |
Date: | Sun, 09 Mar 2008 17:01:25 -0500 |
To: | bug-Perl-Critic [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
BuiltinFunctions::ProhibitStringyEval gives
Expression form of "eval" at line 12, column 6. See page 161 of PBP. (Severity: 5)
for code:
my $x = 2;
my $y = '4711 * $x';
# reevaluate
$y = eval "qq{$y}";
Perl has this useful feature of evaluation at runtime.
It would be nice, if we could give the critique only when the reevaluation
yields code, but not for reevaluating $variables in expressions giving values.
But I have no idea how to detect that.