From 71b5b09275d3559bebc79f842a9d77a22ff0f745 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 8 Nov 2012 11:38:59 +0200 Subject: [PATCH] Replace mentions of the "-w" flag in perl.pod. Replace these mentions of the deprecated -w flag (which is applied globally) with mentions of use warnings (and possibly also use strict). Thanks to tm604 on Freenode's #perl for noticing that. --- pod/perl.pod | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pod/perl.pod b/pod/perl.pod index a85b9bf..734f443 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -278,8 +278,9 @@ On a Unix-like system, these documentation files will usually also be available as manpages for use with the F program. In general, if something strange has gone wrong with your program and you're -not sure where you should look for help, try the B<-w> switch first. It will -often point out exactly where the trouble is. +not sure where you should look for help, try making your code comply with +B and B. These will often point out exactly +where the trouble is. =head1 DESCRIPTION @@ -429,8 +430,11 @@ Perl developers, please write to perl-thanks@perl.org . =head1 DIAGNOSTICS -The C pragma (and the B<-w> switch) produces some -lovely diagnostics. +Using the C pragma ensures that all variables are properly +declared and prevents other misuses of legacy Perl features. + +The C pragma (and the globally applied and deprecated B<-w> +switch) produce some lovely diagnostics. See L for explanations of all Perl's diagnostics. The C pragma automatically turns Perl's normally terse warnings @@ -444,12 +448,12 @@ B<-e> is counted as one line.) Setuid scripts have additional constraints that can produce error messages such as "Insecure dependency". See L. -Did we mention that you should definitely consider using the B<-w> -switch? +Did we mention that you should definitely consider using the B +pragma? =head1 BUGS -The B<-w> switch is not mandatory. +The behavior implied by the B pragma is not mandatory. Perl is at the mercy of your machine's definitions of various operations such as type casting, atof(), and floating-point -- 2.7.4