Just another Perl shrine | |
PerlMonks |
Re: perlcritic compliant way to eval?by ikegami (Patriarch) |
on Jul 20, 2016 at 20:17 UTC ( [id://1168173]=note: print w/replies, xml ) | Need Help?? |
You want to do exactly what it warns you is dangerous to do, so the appropriate solution is to simply silence the critic using the directive that does so. Trying to hide that you are doing something dangerous by fooling perlcritic into not noticing is not appropriate. Independently, you might find using do($test_env) or die($@ || $!); simpler to use in this case. I don't know if perlcritic warns about that, but that's besides the point.
In Section
Seekers of Perl Wisdom
|
|