Re: [perl #75570] perl -h recommends using -w

[email protected] (Abigail)
Newsgroups perl.perl5.porters
Message-ID <20100607075148.GQ12847@almanda>
On Sat, Jun 05, 2010 at 08:45:24PM -0700, [email protected] wrote:
> # New Ticket Created by  [email protected] 
> # Please include the string:  [perl #75570]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75570 >
> 
> 
> 
> This is a bug report for perl from [email protected],
> generated with the help of perlbug 1.39 running under perl 5.10.1.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Hi,
> 
> the output of perl -h still recommends the use of the -w switch:
> 
>   -w                enable many useful warnings (RECOMMENDED)
> 
> But as far as I know "use warnings;" is preferred nowadays as that will not
> enable warnings in every loaded module (see "What's wrong with -w and $^W" in
> perldoc perllexwarn).
> 
> I suggest that the output of perl -h recommends "use warnings;" over the use of
> the -w switch.  perldoc perlrun should also be changed in that case: it
> mentions that "use warnings;" is possible, but does not state that this is
> recommended.
> 
> Looking at perl.c, this issue is still present in the latest Git tree.


I do not think 'perl -h' is the place to give recommendations on how
code should be written. 'perl -h' gives a list and a brief explanation of
the command line switches. IMO, it should do just that, and nothing else.

And I'd still recommend using -w in combination with -e.


Abigail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.