From: Gurusamy Sarathy Date: Mon, 7 Feb 2000 16:09:54 +0000 (+0000) Subject: ${^Warnings} renamed to ${^WARNING_BITS} X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a8181172ab18fb057dd6fb202936705ede77746;p=p5sagit%2Fp5-mst-13.2.git ${^Warnings} renamed to ${^WARNING_BITS} p4raw-id: //depot/perl@5025 --- diff --git a/gv.c b/gv.c index f65b1ce..e254c86 100644 --- a/gv.c +++ b/gv.c @@ -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 977395b..6b87d85 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 ; } diff --git a/mg.c b/mg.c index 893f4ff..9dc7030 100644 --- a/mg.c +++ b/mg.c @@ -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 96ec7f0..2f8f3a2 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 cf260c5..5b93be1 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. -=item ${^Warnings} +=item ${^WARNING_BITS} The current set of warning checks enabled by the C pragma. See the documentation of C for more details. diff --git a/warnings.pl b/warnings.pl index 8d3450b..9d57103 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 ; }