Bor has asked for the wisdom of the Perl Monks concerning the following question:
my test file usually start withCode not contained in explicit package. Violates encapsulation (Seve +rity: 4)
How I can prevent this error?use lib qw( lib ); use strict; use warnings; use Test::More tests => 1;
PS.
I try
at end of first line, but it don't help - error appear for next line## no critic (Modules::RequireExplicitPackage)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlcritic & test files
by toolic (Bishop) on Aug 02, 2011 at 12:59 UTC | |
by Bor (Beadle) on Aug 03, 2011 at 10:11 UTC | |
|
Re: perlcritic & test files
by JavaFan (Canon) on Aug 02, 2011 at 16:20 UTC | |
by osbosb (Monk) on Aug 02, 2011 at 16:59 UTC | |
by trwww (Priest) on Aug 02, 2011 at 18:03 UTC | |
by toolic (Bishop) on Aug 02, 2011 at 19:52 UTC |