File Coverage

blib/lib/App/datasection/Command.pm
Criterion Covered Total %
statement 27 27 100.0
branch 2 4 50.0
condition n/a
subroutine 8 8 100.0
pod 2 2 100.0
total 39 41 95.1


line stmt bran cond sub pod time code
1 1     1   1085 use warnings;
  1         3  
  1         71  
2 1     1   18 use 5.020;
  1         6  
3 1     1   6 use experimental qw( signatures );
  1         2  
  1         24  
4 1     1   202 use stable qw( postderef );
  1         2  
  1         9  
5 1     1   104 use true;
  1         2  
  1         8  
6              
7             package App::datasection::Command 0.01 {
8              
9             # ABSTRACT: Base class for datasection subcommands
10             # VERSION
11              
12              
13 1     1   2574 use App::Cmd::Setup -command;
  1         2  
  1         8  
14              
15             sub opt_spec {
16             return (
17 4     4 1 67126 [ "dir|d=s" => "Directory to extract to" ],
18             );
19             }
20              
21 4     4 1 4876 sub validate_args ($self, $opt, $args) {
  4         10  
  4         12  
  4         5  
  4         34  
22 4         12 my(@files) = @$args;
23 4 50       15 $self->usage_error("Perl source files are required") unless @files;
24 4         12 foreach my $file (@files) {
25 4 50       119 $self->usage_error("No such file $file") unless -f $file;
26             }
27             }
28              
29             }
30              
31             __END__