diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-05-14 16:15:09 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-05-14 16:15:09 +0000 |
commit | a5871d1a83cd3d5c7292135cbb30a336a8552ab0 (patch) | |
tree | e056f664b56c544259b77891801390c472109ed0 /lib/strict.pm | |
parent | 841a92052a6767bd088da257cef4b0db4ccd123d (diff) | |
parent | 20408e3ccf502b6ce4033d8203710405ec9ef8f6 (diff) | |
download | perl-a5871d1a83cd3d5c7292135cbb30a336a8552ab0.tar.gz |
Integrate win32 branch into mainline
p4raw-id: //depot/perl@969
Diffstat (limited to 'lib/strict.pm')
-rw-r--r-- | lib/strict.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/strict.pm b/lib/strict.pm index af95b3d096..2b1d964e65 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -77,14 +77,17 @@ See L<perlmod/Pragmatic Modules>. =cut +$strict::VERSION = "1.01"; + +my %bitmask = ( +refs => 0x00000002, +subs => 0x00000200, +vars => 0x00000400 +); + sub bits { my $bits = 0; - my $sememe; - foreach $sememe (@_) { - $bits |= 0x00000002, next if $sememe eq 'refs'; - $bits |= 0x00000200, next if $sememe eq 'subs'; - $bits |= 0x00000400, next if $sememe eq 'vars'; - } + foreach my $s (@_){ $bits |= $bitmask{$s} || 0; }; $bits; } |