Replace gruntmaster-* scripts with App::Cmd-based gm
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / List.pm
1 package Gruntmaster::App::Command::List;
2
3 use 5.014000;
4 use warnings;
5
6 our $VERSION = '5999.000_004';
7
8 use Gruntmaster::App '-command';
9 use Gruntmaster::Data;
10
11 sub usage_desc { '%c [-cjpu] list' }
12
13 sub validate_args {
14 my ($self, $opt, $args) = @_;
15 my @args = @$args;
16 $self->usage_error('No table selected') unless $self->app->table;
17 }
18
19 sub execute {
20 my ($self, $opt, $args) = @_;
21 say join "\n", db->select($self->app->table, 'id', {}, 'id')->flat
22 }
23
24 1;
25 __END__
This page took 0.022213 seconds and 5 git commands to generate.