Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Is using '-s' really bad and why?

by rdm (Hermit)
on Oct 19, 2004 at 02:03 UTC ( #400385=note: print w/replies, xml ) Need Help??

in reply to Is using '-s' really bad and why?

This is a great example of a very well written, well tested, and well reasoned set of arguments. That I respectfully disagree with.

'-s' is not, in itself, intrinsically bad. It does have side effects, as demonstrated by far finer minds than my own, but these do not negate it's usefullness - with the proviso that you are aware of the possible abuses, and take care to mitigate them.

For example: You would not use '-s' in a module-heavy program, as there is too much risk of malicious arguments changing the behaviour of the modules.

You would, OTOH, use it in a small script that has no dependant modules. Even the use of '--x' in the context of use strict; is not entirely bad - as it produces an error response to an invalid invocation, although not exactly a useful error response. (Which is why I do not call it good!)

Lastly, in response to the question 'Why use it?', the answer is simple. If you are writing a small program, especially one that might be run in a number of environments - that you have little or no control over, it allows you to avoid yet another module dependancy.


-Reality might not get out of Beta today. (O.Timas, "Bot")

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2020-11-24 06:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found