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 /warnings.pl | |
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 'warnings.pl')
-rw-r--r-- | warnings.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/warnings.pl b/warnings.pl index 72d19af67b..8d3450b4cd 100644 --- a/warnings.pl +++ b/warnings.pl @@ -300,14 +300,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 ; |