diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2000-08-29 00:55:06 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-28 23:12:05 +0000 |
commit | f1f338184e4a44fc14036174dbaf0664efde29d6 (patch) | |
tree | 83c2c046990c9d1bfbe59b8e24a1788f84ed540d /lib | |
parent | dbc74947e9fc1a7cf5a73c334e78f12a4207c5c2 (diff) | |
download | perl-f1f338184e4a44fc14036174dbaf0664efde29d6.tar.gz |
warnings fixes
Message-ID: <000501c01143$0230af80$2014140a@bfs.phone.com>
p4raw-id: //depot/perl@6869
Diffstat (limited to 'lib')
-rw-r--r-- | lib/warnings.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm index df9f787e1c..2517239365 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -303,14 +303,19 @@ sub bits { sub import { shift; - ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ; + my $mask = ${^WARNING_BITS} ; + if (vec($mask, $Offsets{'all'}, 1)) { + $mask |= $Bits{'all'} ; + $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1); + } + ${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ; } sub unimport { shift; my $mask = ${^WARNING_BITS} ; if (vec($mask, $Offsets{'all'}, 1)) { - $mask = $Bits{'all'} ; + $mask |= $Bits{'all'} ; $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1); } ${^WARNING_BITS} = $mask & ~ (bits(@_ ? @_ : 'all') | $All) ; |