http://qs321.pair.com?node_id=400385


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.

-Rob

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