File Coverage

lib/App/Sandy/Command/Quality/Remove.pm
Criterion Covered Total %
statement 3 14 21.4
branch 0 6 0.0
condition n/a
subroutine 1 3 33.3
pod 2 2 100.0
total 6 25 24.0


line stmt bran cond sub pod time code
1             package App::Sandy::Command::Quality::Remove;
2             # ABSTRACT: quality subcommand class. Remove a quality profile from database.
3              
4 1     1   7012 use App::Sandy::Base 'class';
  1         2  
  1         8  
5              
6             extends 'App::Sandy::Command::Quality';
7              
8             our $VERSION = '0.24'; # VERSION
9              
10             override 'opt_spec' => sub {
11             super,
12             'verbose|v'
13             };
14              
15             sub validate_args {
16 0     0 1   my ($self, $args) = @_;
17 0           my $quality_profile = shift @$args;
18              
19 0 0         if (not defined $quality_profile) {
20 0           die "Missing quality-profile\n";
21             }
22              
23 0 0         die "Too many arguments: '@$args'\n" if @$args;
24             }
25              
26             sub execute {
27 0     0 1   my ($self, $opts, $args) = @_;
28 0           my $quality_profile = shift @$args;
29              
30 0 0         $LOG_VERBOSE = exists $opts->{verbose} ? $opts->{verbose} : 0;
31              
32 0           log_msg ":: Attempting to remove '$quality_profile' ...";
33 0           $self->deletedb($quality_profile);
34 0           log_msg ":: Done!";
35             }
36              
37             __END__
38              
39             =pod
40              
41             =encoding UTF-8
42              
43             =head1 NAME
44              
45             App::Sandy::Command::Quality::Remove - quality subcommand class. Remove a quality profile from database.
46              
47             =head1 VERSION
48              
49             version 0.24
50              
51             =head1 SYNOPSIS
52              
53             sandy quality remove <quality-profile>
54              
55             Arguments:
56             a quality-profile entry
57              
58             Options:
59             -h, --help brief help message
60             -H, --man full documentation
61             -v, --verbose print log messages
62              
63             =head1 DESCRIPTION
64              
65             Remove a quality-profile from database.
66              
67             =head1 AUTHORS
68              
69             =over 4
70              
71             =item *
72              
73             Thiago L. A. Miller <tmiller@mochsl.org.br>
74              
75             =item *
76              
77             J. Leonel Buzzo <lbuzzo@mochsl.org.br>
78              
79             =item *
80              
81             Felipe R. C. dos Santos <fsantos@mochsl.org.br>
82              
83             =item *
84              
85             Helena B. Conceição <hconceicao@mochsl.org.br>
86              
87             =item *
88              
89             Rodrigo Barreiro <rbarreiro@mochsl.org.br>
90              
91             =item *
92              
93             Gabriela Guardia <gguardia@mochsl.org.br>
94              
95             =item *
96              
97             Fernanda Orpinelli <forpinelli@mochsl.org.br>
98              
99             =item *
100              
101             Rafael Mercuri <rmercuri@mochsl.org.br>
102              
103             =item *
104              
105             Rodrigo Barreiro <rbarreiro@mochsl.org.br>
106              
107             =item *
108              
109             Pedro A. F. Galante <pgalante@mochsl.org.br>
110              
111             =back
112              
113             =head1 COPYRIGHT AND LICENSE
114              
115             This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital.
116              
117             This is free software, licensed under:
118              
119             The GNU General Public License, Version 3, June 2007
120              
121             =cut