lib/App/Sandy/Command/Variation/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/Variation/Dump.pm ↑ Summary lib/App/Sandy/Command/Variation/Restore.pm »
1 package App::Sandy::Command::Variation::Remove;
2 # ABSTRACT: variation subcommand class. Remove structural variation from database.
3  
4 1 ▶use App::Sandy::Base 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 extends 'App::Sandy::Command::Variation';
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 $structural_variation = shift @$args;
18  
19 # Mandatory file
20 if (not defined $structural_variation) {
21 die "Missing structural variation\n";
22 }
23  
24 die "Too many arguments: '@$args'\n" if @$args;
25 }
26  
27 sub execute {
28 my ($self, $opts, $args) = @_;
29 my $structural_variation = shift @$args;
30  
31 $LOG_VERBOSE = exists $opts->{verbose} ? $opts->{verbose} : 0;
32  
33 log_msg ":: Attempting to remove $structural_variation ...";
34 $self->deletedb($structural_variation);
35 log_msg ":: Done!";
36 }
37  
38 __END__
« lib/App/Sandy/Command/Variation/Dump.pm ↑ Summary lib/App/Sandy/Command/Variation/Restore.pm »