X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FApp%2FCommand%2FList.pm;fp=lib%2FGruntmaster%2FApp%2FCommand%2FList.pm;h=3c62604c221178f89b090ded5352061880734c23;hb=92f74061ec24c7d45c9312ae54280356530f6c8c;hp=0000000000000000000000000000000000000000;hpb=341fb89345d050a28105184a3fba1be1359e7bd2;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/App/Command/List.pm b/lib/Gruntmaster/App/Command/List.pm new file mode 100644 index 0000000..3c62604 --- /dev/null +++ b/lib/Gruntmaster/App/Command/List.pm @@ -0,0 +1,25 @@ +package Gruntmaster::App::Command::List; + +use 5.014000; +use warnings; + +our $VERSION = '5999.000_004'; + +use Gruntmaster::App '-command'; +use Gruntmaster::Data; + +sub usage_desc { '%c [-cjpu] list' } + +sub validate_args { + my ($self, $opt, $args) = @_; + my @args = @$args; + $self->usage_error('No table selected') unless $self->app->table; +} + +sub execute { + my ($self, $opt, $args) = @_; + say join "\n", db->select($self->app->table, 'id', {}, 'id')->flat +} + +1; +__END__