Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to perlcritic compliant way to eval?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168173]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found