Perldoc Search: "$^W" perl-5.20.1

search official POD


6 PODs, 15 LINEs found.
perltie.pod
48 :                     carp "Nice::Tie::Scalar got non-numeric pid $pid" if $^W;
53 :                     carp "Nice::Tie::Scalar got bad pid $pid: $!" if $^W;
60 :         This tie class has chosen to return an error rather than raising an exception if its constructor should fail. While this is how dbmopen() works, other classes may well not wish to be so forgiving. It checks the global variable $^W to see whether to emit a bit of noise anyway.
90 :                           $new_nicety, PRIO_MIN if $^W;
97 :                           $new_nicety, PRIO_MAX if $^W;
perlrun.pod
487 :          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" in perlfunc. See also perldiag and perltrap. A fine-grained warning facility is also available if you want to manipulate entire classes of warnings; see warnings.
489 :     -W   Enables all warnings regardless of "no warnings" or $^W. See warnings.
491 :     -X   Disables all warnings regardless of "use warnings" or $^W. See warnings.
perlop.pod
1373 :         A common mistake is to try to separate the words with comma or to put comments into a multi-line "qw"-string. For this reason, the "use warnings" pragma and the -w switch (that is, the $^W variable) produces warnings if the STRING contains the "," or the "#" character.
1619 :             It is at this step that "\1" is begrudgingly converted to $1 in the replacement text of "s///", in order to correct the incorrigible *sed* hackers who haven't picked up the saner idiom yet. A warning is emitted if the "use warnings" pragma or the -w command-line flag (that is, the $^W variable) was set.
1690 :     In other boolean contexts, "<FILEHANDLE>" without an explicit "defined" test or comparison elicits a warning if the "use warnings" pragma or the -w command-line switch (the $^W variable) is in effect.
perlvar.pod
8 :     Perl variable names may also be a sequence of digits or a single punctuation or control character. These names are all reserved for special uses by Perl; for example, the all-digits names are used to hold data captured by backreferences after a regular expression match. Perl has a special syntax for the single-control-character names: It understands "^X" (caret "X") to mean the control-"X" character. For example, the notation $^W (dollar-sign caret "W") is the scalar variable whose name is the single character control-"W". This is better than typing a literal control-"W" into your program.
878 :     $^W     The current value of the warning switch, initially true if -w was used, false otherwise, but directly modifiable.
perldata.pod
92 :     A sigil, followed by either a caret and a single POSIX uppercase letter, like $^V or $^W, or a sigil followed by a literal control character matching the "\p{POSIX_Cntrl}" property. Due to a historical oddity, if not running under "use utf8", the 128 extra controls in the "[0x80-0xff]" range may also be used in length one variables. The use of a literal control character is deprecated. Support for this form will be removed in a future version of perl.
perlstyle.pod
7 :     The most important thing is to run your programs under the -w flag at all times. You may turn it off explicitly for particular portions of code via the "no warnings" pragma or the $^W variable if you must. You should also always run under "use strict" or know the reason why not. The "use sigtrap" and even "use diagnostics" pragmas may also prove useful.
<< Back to Perldoc Search