Add show_job and show_user to gm command
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / Get.pm
CommitLineData
92f74061
MG
1package Gruntmaster::App::Command::Get;
2
3use 5.014000;
4use warnings;
5
6our $VERSION = '5999.000_004';
7
8use Gruntmaster::App '-command';
9use Gruntmaster::Data;
10
11sub usage_desc { '%c [-cjpu] get id column' }
12
13sub validate_args {
14 my ($self, $opt, $args) = @_;
15 my @args = @$args;
16 $self->usage_error('No table selected') unless $self->app->table;
17 $self->usage_error('Wrong number of arguments') if @args != 2;
18}
19
20sub execute {
21 my ($self, $opt, $args) = @_;
22 my ($obj, $col) = @$args;
23 say db->select($self->app->table, $col, {id => $obj})->flat
24}
25
261;
27__END__
This page took 0.009968 seconds and 4 git commands to generate.