Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^7: loop iterator in a string

by haukex (Bishop)
on Sep 28, 2021 at 11:07 UTC ( #11137083=note: print w/replies, xml ) Need Help??


in reply to Re^6: loop iterator in a string
in thread loop iterator in a string

checking eval for errors is enough, once the code fails.

... but then you don't have protection from unsafe code, which I thought was the point of your post. I generally suggest checking eval for errors because it's a good habit to get into, though with the very restrictive regex I suggested I might be open to the argument that this case might be an exception to that rule.

Your all-covered approach reminds me of parents insisting to drive their kids to school while they keep their bike's helmet on. Like this you are scaring them away from learning how to bike by themselves.

Defensive programming is a very different thing from your analogy, which I would say is too extreme and too much rhetoric. Showing your kids how to properly put on their safety gear is not a bad thing.

Replies are listed 'Best First'.
Re^8: loop iterator in a string
by LanX (Sage) on Sep 28, 2021 at 11:11 UTC
    > ... but then you don't have protection from unsafe code,

    plus my regex of course.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2022-01-21 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?