in reply to Re^4: Disabling runtime warnings in dynamic scope?
in thread Disabling runtime warnings in dynamic scope?
From perlvar
● $WARNING● $^W
The current value of the warning switch, initially true if -w was used, false otherwise, but directly modifiable.
See also warnings.
Mnemonic: related to the -w switch.
● ${^WARNING_BITS}
The current set of warning checks enabled by the use warnings pragma. It has the same scoping as the $^H and %^H variables. The exact values are considered internal to the warnings pragma and may change between versions of Perl.
This variable was added in Perl v5.6.0.
I suppose that ${^WARNING_BITS} * can be dynamically changed, but then only with great care (I wouldn't be surprised if implementation changed)
The bits are supposed to be set by use warnings which is statically scoped, hence here are dragons!
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
*) to answer my own suspicion, ${^WARNING_BITS} are only set at compile-time and undef at run-time!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Disabling runtime warnings in dynamic scope?
by LanX (Saint) on Apr 26, 2018 at 14:02 UTC |