blib/lib/Punk/Command/Queue.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 84.8% 28 / 33 CC 1 SCAR 1.3
CC
1
Cov
85%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/Punk/Queue/Worker.pm ↑ Summary include/pq_pg.h »
1 package Punk::Command::Queue;
2  
3 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Punk::Command ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Punk::Queue::Command ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $VERSION = '0.11';
10  
11 # The seam bin/punk probes on an unknown command: loading this module is the
12 # registration. `punk queue X ...` forwards raw argv to the punk-queue
13 # dispatcher, so the two spellings are the same CLI - one option surface,
14 # one help, byte-identical output.
15  
16 Punk::Command->register(queue => {
17 abstract => 'the job queue (punk-queue)',
18 display => 'queue <command>',
19 usage => '<command> [options]',
20 desc => 'Everything bin/punk-queue does - worker, enqueue, jobs, '
21 . "stats, crons, locks,\nmigrate and the rest - reached as a "
22 . 'punk subcommand.',
23 raw => 1,
24 7 ▶ code => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
25 7 my (undef, @argv) = @_;
26 7 return Punk::Queue::Command::main(@argv);
27 },
28 1 ▶}, __PACKAGE__) if Punk::Command->can('register');
Branch: 1 branch
BranchTrueFalseTotal
if "Punk::Command"->can("register") 1 0 1
29  
30 0 ▶Punk::Command->register_doctor('Punk::Queue' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
31 0 require Punk::Queue;
32 0 return (1, $Punk::Queue::VERSION);
33 1 ▶}, __PACKAGE__) if Punk::Command->can('register_doctor');
Branch: 1 branch
BranchTrueFalseTotal
if "Punk::Command"->can("register_doctor") 1 0 1
34  
35 1 1;
36  
37 __END__
« blib/lib/Punk/Queue/Worker.pm ↑ Summary include/pq_pg.h »