lib/App/Sandy/CLI/Command.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/CLI/App.pm ↑ Summary lib/App/Sandy/Command/Citation.pm »
1 package App::Sandy::CLI::Command;
2 # ABSTRACT: App::Sandy::CLI subclass for commands interface
3  
4 1 ▶use App::Sandy::Base 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 extends 'App::Sandy::CLI';
7  
8 our $VERSION = '0.25'; # VERSION
9  
10 override 'opt_spec' => sub {
11 super
12 };
13  
14 sub validate_args {
15 # It needs to be override
16 }
17  
18 sub validate_opts {
19 # It needs to be override
20 }
21  
22 sub execute {
23 # It needs to be override
24 }
25  
26 sub fill_opts {
27 my ($self, $opts, $default_opt) = @_;
28 if (ref $opts ne 'HASH' || ref $default_opt ne 'HASH') {
29 die '$opts and $default_opt need to be a hash reference';
30 }
31  
32 for my $opt (keys %$default_opt) {
33 $opts->{$opt} = $default_opt->{$opt} if not exists $opts->{$opt};
34 }
35 }
36  
37 __END__
« lib/App/Sandy/CLI/App.pm ↑ Summary lib/App/Sandy/Command/Citation.pm »