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: 20746
Status: rejected
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: perl [...] rbt.ca
Cc:
AdminCc:

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



Subject: ProhibitStringyEval complains about legitimate case
It would be useful if ProhibitStringyEval would still allow single line "require $class;" and "use $class;" calls. These are pretty legitimate uses of a StringyEval, unless there is a better way of doing the above that I don't know of?
From: CLOTHO [...] cpan.org
On Fri Jul 28 15:04:35 2006, perl@rbt.ca wrote: Show quoted text
> It would be useful if ProhibitStringyEval would still allow single line > "require $class;" and "use $class;" calls. > > These are pretty legitimate uses of a StringyEval, unless there is a > better way of doing the above that I don't know of?
Yes, those are valid exceptions. The way to flag them is like this in your source code: eval "require $class"; ##no critic(ProhibitStringyEval) That tells Perl::Critic "Trust me, I know what I'm doing." Chris