#!/usr/bin/env perl
use
5.008;
our
$VERSION
= 0.001;
use
Carp
qw( croak carp )
;
my
$bundle
= create_bundle(
'Example::Author::KENTNL'
);
$bundle
->configure;
my
@stopwords
= (
qw(
munge munges
)
);
for
my
$wordlist
(
@stopwords
) {
$bundle
->add_or_append_policy_field(
'Documentation::PodSpelling'
=> (
'stop_words'
=>
$wordlist
) );
}
$bundle
->remove_policy(
'NamingConventions::Capitalization'
);
$bundle
->remove_policy(
'NamingConventions::ProhibitMixedCaseSubs'
);
my
$inf
=
$bundle
->actionlist->get_inflated;
my
$config
=
$inf
->apply_config;
{
my
$rcfile
= path(
'./perlcritic.rc'
)->openw_utf8;
$rcfile
->
print
(
$config
->as_ini,
"\n"
);
close
$rcfile
or croak
'Something fubared closing perlcritic.rc'
;
}
my
$deps
=
$inf
->own_deps;
{
my
$target
= path(
'./misc'
);
$target
->mkpath
if
not
$target
->is_dir;
my
$depsfile
=
$target
->child(
'perlcritic.deps'
)->openw_utf8;
for
my
$key
(
sort
keys
%{
$deps
} ) {
$depsfile
->
printf
(
"%s~%s\n"
,
$key
,
$deps
->{
$key
} );
*STDERR
->
printf
(
"%s => %s\n"
,
$key
,
$deps
->{
$key
} );
}
close
$depsfile
or carp
'Something fubared closing perlcritic.deps'
;
}