/
Command.pm
55 lines (32 loc) · 1.02 KB
/
Command.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package App::Pinto::Admin::Command;
# ABSTRACT: Base class for pinto-admin commands
use strict;
use warnings;
#-----------------------------------------------------------------------------
use App::Cmd::Setup -command;
#-----------------------------------------------------------------------------
# VERSION
#-----------------------------------------------------------------------------
sub opt_spec {
my ( $self, $app ) = @_;
return (
[ 'man' => 'Show manual for this command' ],
);
}
#-----------------------------------------------------------------------------
sub validate_args {
my ($self, $opts, $args) = @_;
die "RTFM!\n" if $opts->{man};
}
#-----------------------------------------------------------------------------
=method pinto()
Returns the Pinto object for this command. Basically an alias for
$self->app();
=cut
sub pinto {
my ($self) = @_;
return $self->app->pinto();
}
#-----------------------------------------------------------------------------
1;
__END__