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

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::Netdisco::Worker::Plugin::Hook;
2  
3 use Dancer ':syntax';
4 use App::Netdisco::Worker::Plugin;
5 use aliased 'App::Netdisco::Worker::Status';
6  
7 register_worker({ phase => 'check' }, sub {
8 my ($job, $workerconf) = @_;
9  
10 return Status->error('can only run a specific hook')
11 unless $job->action eq 'hook' and defined $job->only_namespace;
12  
13 return Status->done('Hook is able to run.');
14 });
15  
16 true;