diff options
-rw-r--r-- | gv.c | 4 | ||||
-rw-r--r-- | lib/warnings.pm | 6 | ||||
-rw-r--r-- | mg.c | 8 | ||||
-rw-r--r-- | pod/perltoc.pod | 2 | ||||
-rw-r--r-- | pod/perlvar.pod | 2 | ||||
-rw-r--r-- | warnings.pl | 6 |
6 files changed, 14 insertions, 14 deletions
@@ -845,8 +845,8 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) 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; diff --git a/lib/warnings.pm b/lib/warnings.pm index 977395b74e..6b87d85f2b 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -131,12 +131,12 @@ sub bits { sub import { shift; - ${^Warnings} |= bits(@_ ? @_ : 'all') ; + ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ; } sub unimport { shift; - ${^Warnings} &= ~ bits(@_ ? @_ : 'all') ; + ${^WARNING_BITS} &= ~ bits(@_ ? @_ : 'all') ; } sub enabled @@ -144,7 +144,7 @@ sub enabled my $string = shift ; return 1 - if $bits{$string} && ${^Warnings} & $bits{$string} ; + if $bits{$string} && ${^WARNING_BITS} & $bits{$string} ; return 0 ; } @@ -570,10 +570,10 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) 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) { @@ -1713,7 +1713,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) 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); @@ -1721,7 +1721,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) | (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; diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 96ec7f0e75..2f8f3a27af 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -1826,7 +1826,7 @@ $EFFECTIVE_USER_ID, $EUID, $>, $REAL_GROUP_ID, $GID, $(, $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} diff --git a/pod/perlvar.pod b/pod/perlvar.pod index cf260c54fe..5b93be11f0 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -914,7 +914,7 @@ The current value of the warning switch, initially true if B<-w> 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. diff --git a/warnings.pl b/warnings.pl index 8d3450b4cd..9d571038e2 100644 --- a/warnings.pl +++ b/warnings.pl @@ -316,12 +316,12 @@ sub bits { sub import { shift; - ${^Warnings} |= bits(@_ ? @_ : 'all') ; + ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ; } sub unimport { shift; - ${^Warnings} &= ~ bits(@_ ? @_ : 'all') ; + ${^WARNING_BITS} &= ~ bits(@_ ? @_ : 'all') ; } sub enabled @@ -329,7 +329,7 @@ sub enabled my $string = shift ; return 1 - if $bits{$string} && ${^Warnings} & $bits{$string} ; + if $bits{$string} && ${^WARNING_BITS} & $bits{$string} ; return 0 ; } |