in your dist.ini, just add:
and dist-zilla will automatically create for you an xt/author/critic.t file that will criticize your code during author tests.[CriticTests]
of course, since your code will be munged by dist-zilla, code that passes critics in your repo may fail after being rewritten... case in point: stricture use, since dist-zilla-plugin-pkgversion will insert a version just after the package statement - and thus before any use statements. in order to make your code compliant again, just move the use strict / warnings before the package. indeed, use is lexically scoped, and thus the scope of the use statement will be the whole file.
your code will now look like:
and of course, perlcritic this time will now be happy.use strict;
use warnings;
package Foo::Bar;
No comments:
Post a Comment