diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-02 06:27:43 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-02 06:27:43 +0000 |
commit | 327afb7f88ad8e777feb1035abf13a2fc193c626 (patch) | |
tree | 916fcc7a43a6ceac75fc328a9effecf032e0485d /lib/warnings.pm | |
parent | b9b446592491a9e83ac86f67237cd6509788def1 (diff) | |
download | perl-327afb7f88ad8e777feb1035abf13a2fc193c626.tar.gz |
future-proof unknown warning categories (from Greg Bacon
<gbacon@cs.uah.edu>)
p4raw-id: //depot/perl@4947
Diffstat (limited to 'lib/warnings.pm')
-rw-r--r-- | lib/warnings.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm index e15d364193..977395b74e 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -115,14 +115,15 @@ sub bits { my $catmask ; my $fatal = 0 ; foreach my $word (@_) { - if ($word eq 'FATAL') - { $fatal = 1 } - elsif ($catmask = $Bits{$word}) { - $mask |= $catmask ; - $mask |= $DeadBits{$word} if $fatal ; + if ($word eq 'FATAL') { + $fatal = 1; + } + else { + if ($catmask = $Bits{$word}) { + $mask |= $catmask ; + $mask |= $DeadBits{$word} if $fatal ; + } } - else - { croak "unknown warning category '$word'" } } return $mask ; |