This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.001 patch.1f
[perl5.git] / lib / strict.pm
CommitLineData
a0d0e21e
LW
1package strict;
2
3sub bits {
4 my $bits = 0;
5 foreach $sememe (@_) {
6 $bits |= 0x00000002 if $sememe eq 'refs';
7 $bits |= 0x00000200 if $sememe eq 'subs';
8 $bits |= 0x00000400 if $sememe eq 'vars';
9 }
10 $bits;
11}
12
13sub import {
14 shift;
15 $^H |= bits(@_ ? @_ : qw(refs subs vars));
16}
17
18sub unimport {
19 shift;
20 $^H &= ~ bits(@_ ? @_ : qw(refs subs vars));
21}
22
231;