lib/App/Sandy/Command/Quality/Remove.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« lib/App/Sandy/Command/Quality/Dump.pm ↑ Summary lib/App/Sandy/Command/Quality/Restore.pm »
1 package App::Sandy::Command::Quality::Remove;
2 # ABSTRACT: quality subcommand class. Remove a quality profile from database.
3  
4 1 ▶use App::Sandy::Base 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 extends 'App::Sandy::Command::Quality';
7  
8 our $VERSION = '0.25'; # VERSION
9  
10 override 'opt_spec' => sub {
11 super,
12 'verbose|v'
13 };
14  
15 sub validate_args {
16 my ($self, $args) = @_;
17 my $quality_profile = shift @$args;
18  
19 if (not defined $quality_profile) {
20 die "Missing quality-profile\n";
21 }
22  
23 die "Too many arguments: '@$args'\n" if @$args;
24 }
25  
26 sub execute {
27 my ($self, $opts, $args) = @_;
28 my $quality_profile = shift @$args;
29  
30 $LOG_VERBOSE = exists $opts->{verbose} ? $opts->{verbose} : 0;
31  
32 log_msg ":: Attempting to remove '$quality_profile' ...";
33 $self->deletedb($quality_profile);
34 log_msg ":: Done!";
35 }
36  
37 __END__
« lib/App/Sandy/Command/Quality/Dump.pm ↑ Summary lib/App/Sandy/Command/Quality/Restore.pm »