lib/App/Sandy/Command/Quality/Dump.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/Add.pm ↑ Summary lib/App/Sandy/Command/Quality/Remove.pm »
1 package App::Sandy::Command::Quality::Dump;
2 # ABSTRACT: quality subcommand class. Dump 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 sub validate_args {
11 my ($self, $args) = @_;
12 my $quality_profile = shift @$args;
13  
14 if (not defined $quality_profile) {
15 die "Missing quality-profile\n";
16 }
17  
18 die "Too many arguments: '@$args'\n" if @$args;
19 }
20  
21 sub execute {
22 my ($self, $opts, $args) = @_;
23 my $quality_profile = shift @$args;
24  
25 my ($matrix, $deepth, $partil) = $self->retrievedb($quality_profile);
26  
27 for (my $line = 0; $line < $deepth; $line++) {
28 for (my $col = 0; $col < $partil; $col++) {
29 print "$matrix->[$col][$line]";
30 }
31 print "\n";
32 }
33 }
34  
35 __END__
« lib/App/Sandy/Command/Quality/Add.pm ↑ Summary lib/App/Sandy/Command/Quality/Remove.pm »