summaryrefslogtreecommitdiff
path: root/warnings.pl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-02 06:27:43 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-02 06:27:43 +0000
commit327afb7f88ad8e777feb1035abf13a2fc193c626 (patch)
tree916fcc7a43a6ceac75fc328a9effecf032e0485d /warnings.pl
parentb9b446592491a9e83ac86f67237cd6509788def1 (diff)
downloadperl-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.pl15
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 ;