source: trunk/essentials/dev-lang/perl/lib/strict.pm@ 3298

Last change on this file since 3298 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 3.2 KB
Line 
1package strict;
2
3$strict::VERSION = "1.03";
4
5my %bitmask = (
6refs => 0x00000002,
7subs => 0x00000200,
8vars => 0x00000400
9);
10
11sub bits {
12 my $bits = 0;
13 my @wrong;
14 foreach my $s (@_) {
15 push @wrong, $s unless exists $bitmask{$s};
16 $bits |= $bitmask{$s} || 0;
17 }
18 if (@wrong) {
19 require Carp;
20 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
21 }
22 $bits;
23}
24
25my $default_bits = bits(qw(refs subs vars));
26