in reply to Re^3: Modifying Arrays passed by reference to subroutine
in thread Modifying Arrays passed by reference to subroutine
perllexwarn also talks about code in modules; -w enables warnings anywhere, so other people's code (i.e. those people who knew what they were doing and turned off warnings for relevant parts of their code) will throw warnings at you. It may be a lot of warnings.
"Throwing a warning" is exactly equivalent to "returning useless stuff silently" in most scenarios; warnings are written to stderr, which is not available for a lot of programs. And even if it is available — most end users just ignore it. If your code is potentially destructive (and what code isn't) you should die in unexpected situations, not issue a warning.
Also: use warnings FATAL => 'all' is much more aggressive than -w.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Modifying Arrays passed by reference to subroutine
by Marshall (Canon) on Jun 09, 2009 at 11:21 UTC |