if (len > 1)
break;
goto ro_magicalize;
- case '\027': /* $^W & $^Warnings */
- if (len > 1 && strNE(name, "\027arnings"))
+ case '\027': /* $^W & $^WARNING_BITS */
+ if (len > 1 && strNE(name, "\027ARNING_BITS"))
break;
goto magicalize;
sub import {
shift;
- ${^Warnings} |= bits(@_ ? @_ : 'all') ;
+ ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ;
}
sub unimport {
shift;
- ${^Warnings} &= ~ bits(@_ ? @_ : 'all') ;
+ ${^WARNING_BITS} &= ~ bits(@_ ? @_ : 'all') ;
}
sub enabled
my $string = shift ;
return 1
- if $bits{$string} && ${^Warnings} & $bits{$string} ;
+ if $bits{$string} && ${^WARNING_BITS} & $bits{$string} ;
return 0 ;
}
case '\025': /* ^U */
sv_setiv(sv, (IV)PL_bigchar);
break;
- case '\027': /* ^W & $^Warnings*/
+ case '\027': /* ^W & $^WARNING_BITS */
if (*(mg->mg_ptr+1) == '\0')
sv_setiv(sv, (IV)((PL_dowarn & G_WARN_ON) ? TRUE : FALSE));
- else if (strEQ(mg->mg_ptr, "\027arnings")) {
+ else if (strEQ(mg->mg_ptr, "\027ARNING_BITS")) {
if (PL_compiling.cop_warnings == WARN_NONE ||
PL_compiling.cop_warnings == WARN_STD)
{
case '\025': /* ^U */
PL_bigchar = SvTRUE(sv);
break;
- case '\027': /* ^W & $^Warnings */
+ case '\027': /* ^W & $^WARNING_BITS */
if (*(mg->mg_ptr+1) == '\0') {
if ( ! (PL_dowarn & G_WARN_ALL_MASK)) {
i = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
| (i ? G_WARN_ON : G_WARN_OFF) ;
}
}
- else if (strEQ(mg->mg_ptr, "\027arnings")) {
+ else if (strEQ(mg->mg_ptr, "\027ARNING_BITS")) {
if ( ! (PL_dowarn & G_WARN_ALL_MASK)) {
if (memEQ(SvPVX(sv), WARN_ALLstring, WARNsize)) {
PL_compiling.cop_warnings = WARN_ALL;
$EFFECTIVE_GROUP_ID, $EGID, $), $PROGRAM_NAME, $0, $[, $PERL_VERSION, $],
$COMPILING, $^C, $DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H,
$INPLACE_EDIT, $^I, $^M, $OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04,
-0x08, 0x10, 0x20, $^R, $^S, $BASETIME, $^T, $WARNING, $^W, ${^Warnings},
+0x08, 0x10, 0x20, $^R, $^S, $BASETIME, $^T, $WARNING, $^W, ${^WARNING_BITS},
$EXECUTABLE_NAME, $^X, $ARGV, @ARGV, @INC, @_, %INC, %ENV, $ENV{expr},
%SIG, $SIG{expr}
was used, false otherwise, but directly modifiable. (Mnemonic:
related to the B<-w> switch.) See also L<warnings>.
-=item ${^Warnings}
+=item ${^WARNING_BITS}
The current set of warning checks enabled by the C<use warnings> pragma.
See the documentation of C<warnings> for more details.
sub import {
shift;
- ${^Warnings} |= bits(@_ ? @_ : 'all') ;
+ ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ;
}
sub unimport {
shift;
- ${^Warnings} &= ~ bits(@_ ? @_ : 'all') ;
+ ${^WARNING_BITS} &= ~ bits(@_ ? @_ : 'all') ;
}
sub enabled
my $string = shift ;
return 1
- if $bits{$string} && ${^Warnings} & $bits{$string} ;
+ if $bits{$string} && ${^WARNING_BITS} & $bits{$string} ;
return 0 ;
}