make xsubpp generate well-formed code with CAPI && !PERL_OBJECT
[p5sagit/p5-mst-13.2.git] / lib / strict.pm
index af95b3d..940e8bf 100644 (file)
@@ -72,19 +72,22 @@ appears in curly braces or on the left hand side of the "=E<gt>" symbol.
 
 =back
 
-See L<perlmod/Pragmatic Modules>.
+See L<perlmodlib/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;
 }