RabbitFoot/Cmd/Command/purge_queue.pm

filter: Statementstmt 55.0% 11 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 100% 1 / 1 totaltotal 53.8% 14 / 26 CC 1 SCAR 4.7
CC
1
Cov
55%
abstract
2.0
_validate_queue
2.0
_run
2.0
CRAP 1.6
« RabbitFoot.pm ↑ Summary RabbitFoot/Cmd/Command/delete_queue.pm »
1 package Net::RabbitFoot::Cmd::Command::purge_queue;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends qw(MooseX::App::Cmd::Command);
5 1 with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);
6  
7 1 has queue => (
8 isa => 'Str',
9 is => 'rw',
10 required => 1,
11 metaclass => 'MooseX::Getopt::Meta::Attribute',
12 cmd_aliases => 'q',
13 documentation => 'queue name',
14 );
15  
16 1 __PACKAGE__->meta->make_immutable;
17 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 0 ▶sub abstract {
Subroutine abstract: not called CC=1 SCAR=6.9
Pod documented
20 0 return 'purge a queue';
21 }
22  
23 0 ▶sub _validate_queue {
Subroutine _validate_queue: not called CC=1 SCAR=6.9
24 0 my ($self,) = @_;
25  
26 0 $self->_check_queue();
27 0 return;
28 }
29  
30 0 ▶sub _run {
Subroutine _run: not called CC=1 SCAR=6.9
31 0 my ($self, $client, $opt, $args,) = @_;
32  
33 0 my $method_frame = $client->purge_queue(queue => $self->queue)->method_frame;
34  
35 0 print 'Purged queue', "\n";
36 0 print 'message_count: ', $method_frame->message_count, "\n";
37 0 return;
38 }
39  
40 1 1;
41  
« RabbitFoot.pm ↑ Summary RabbitFoot/Cmd/Command/delete_queue.pm »