summaryrefslogtreecommitdiff
path: root/lib/strict.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
commit20408e3ccf502b6ce4033d8203710405ec9ef8f6 (patch)
treeafa7181c847061200a7323363f84fe42102c2aa3 /lib/strict.pm
parent9b599b2a63d2324ddacddd9710c41b795a95070d (diff)
downloadperl-20408e3ccf502b6ce4033d8203710405ec9ef8f6.tar.gz
[win32] merge change#896 from maintbranch
p4raw-link: @896 on //depot/maint-5.004/perl: 0562b9ae2b0eff79632fc0164c13c34c06a019e2 p4raw-id: //depot/win32/perl@938
Diffstat (limited to 'lib/strict.pm')
-rw-r--r--lib/strict.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/strict.pm b/lib/strict.pm
index 8492e933fd..176af387a0 100644
--- a/lib/strict.pm
+++ b/lib/strict.pm
@@ -72,14 +72,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;
}