blib/lib/App/Netdisco/Worker/Plugin/Linter.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::Netdisco::Worker::Plugin::Linter;
2  
3 use Dancer ':syntax';
4 use App::Netdisco::Worker::Plugin;
5  
6 # demonstrator that we can put something in vars
7 # and wrap/augment a python worker with some other stuff
8  
9 register_worker({ phase => 'early' }, sub {
10 my ($job, $workerconf) = @_;
11 my $file = $job->extra and return;
12  
13 vars->{'file_to_lint'} ||=
14 Path::Class::Dir->new( $ENV{DANCER_ENVDIR} )
15 ->file( $ENV{DANCER_ENVIRONMENT} .'.yml' )->stringify;
16 });
17  
18 true;