1 ## name one statement before package
8 $policy = 'Modules::RequireExplicitPackage';
9 is( pcritique($policy, \$code), 1, $policy.' 1 stmnt before package');
11 #-----------------------------------------------------------------------------
13 ## name BEGIN block before package
17 print 'Hello'; #this violation will be squelched
18 print 'Beginning'; #this violation will be squelched
23 #-----------------------------------------------------------------------------
25 ## name inclusion before package
31 #-----------------------------------------------------------------------------
33 ## name two statements before package
37 print 'whatever'; #this violation will be squelched
40 #-----------------------------------------------------------------------------
42 ## name no package at all
47 #-----------------------------------------------------------------------------
49 ## name no statements at all
55 #-----------------------------------------------------------------------------
57 ## name just a package, no statements
62 #-----------------------------------------------------------------------------
71 #-----------------------------------------------------------------------------
73 ## name programs can be exempt
75 ## parms {exempt_scripts => 1}
81 #-----------------------------------------------------------------------------
83 ## name programs not exempted
85 ## parms {exempt_scripts => 0}
89 use warnings; #this violation will be squelched
90 my $foo = 42; #this violation will be squelched
92 #-----------------------------------------------------------------------------
94 ## name programs not exempted, but we have a package
96 ## parms {exempt_scripts => 0}
102 #-----------------------------------------------------------------------------
104 ## name Work around a PPI bug that doesn't return a location for C<({})>.