in reply to Re^2: How should I manage CPAN when using two versions of Perl in my computer?
in thread How should I manage CPAN when using two versions of Perl in my computer?
Regarding the "shebang anomaly", perlrun indicates that:
- -w
prints warnings about dubious constructs, such as variable names mentioned only once and scalar variables used before being set; redefined subroutines; references to undefined filehandles; filehandles opened read-only that you are attempting to write on; values used as a number that don't look like numbers; using an array as though it were a scalar; if your subroutines recurse more than 100 deep; and innumerable other things.
This switch really just enables the global $^W variable; normally, the lexically scoped use warnings pragma is preferred. You can disable or promote into fatal errors specific warnings using __WARN__ hooks, as described in perlvar and warn. See also perldiag and perltrap. A fine-grained warning facility is also available if you want to manipulate entire classes of warnings; see warnings.
I would think if you update the script to use warnings you should be okay in removing the '-w' from the shebang line (although if I am wrong, please respond, so I can learn from the mistake!).
Hope that helps.
|
---|
In Section
Seekers of Perl Wisdom