Perlito5X/strict.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 35 CC 9 SCAR 34.0
CC
9
Cov
0%
import
30.0
unimport
30.0
CRAP 30.0
1 package strict;
2  
3 # magic numbers - See lib/strict.pm in perl distribution
4 $Perlito5::STRICT_REFS = 0x00000002;
5 $Perlito5::STRICT_SUBS = 0x00000200;
6 $Perlito5::STRICT_VARS = 0x00000400;
7  
8 sub import {
9 my ($pkg, @args) = @_;
10 @args = ( 'refs', 'subs', 'vars' )
11 if !@args;
12 for (@args) {
13 $^H |= $Perlito5::STRICT_REFS if $_ eq 'refs';
14 $^H |= $Perlito5::STRICT_SUBS if $_ eq 'subs';
15 $^H |= $Perlito5::STRICT_VARS if $_ eq 'vars';
16 }
17 }
18  
19 sub unimport {
20 my ($pkg, @args) = @_;
21 @args = ( 'refs', 'subs', 'vars' )
22 if !@args;
23 for (@args) {
24 $^H &= ~$Perlito5::STRICT_REFS if $_ eq 'refs';
25 $^H &= ~$Perlito5::STRICT_SUBS if $_ eq 'subs';
26 $^H &= ~$Perlito5::STRICT_VARS if $_ eq 'vars';
27 }
28 }
29  
30 1;
31