Bump version and update Changes
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / List.pm
CommitLineData
92f74061
MG
1package Gruntmaster::App::Command::List;
2
3use 5.014000;
4use warnings;
5
e1b6fd19 6our $VERSION = '5999.000_014';
92f74061
MG
7
8use Gruntmaster::App '-command';
9use Gruntmaster::Data;
10
11sub usage_desc { '%c [-cjpu] list' }
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}
18
19sub execute {
20 my ($self, $opt, $args) = @_;
21 say join "\n", db->select($self->app->table, 'id', {}, 'id')->flat
22}
23
241;
25__END__
63afa40a
MG
26
27=encoding utf-8
28
29=head1 NAME
30
31Gruntmaster::App::Command::List - list all objects of a type
32
33=head1 SYNOPSIS
34
35 gm -c list
36 # test_contest
37 # some_other_contest
38
39 gm -j list # This is pretty pointless
40 # 1
41 # 2
42 # 3
43
44 gm -p list
45 # aplusb
46 # aminusb
47
48 gm -u list
49 # MGV
50 # nobody
51
52=head1 DESCRIPTION
53
54The list command lists the IDs of all objects of a type, one per line.
55The list is sorted.
56
57=head1 SEE ALSO
58
59L<gm>
60
61=head1 AUTHOR
62
63Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
64
65=head1 COPYRIGHT AND LICENSE
66
e1b9f3dd 67Copyright (C) 2014-2015 by Marius Gavrilescu
63afa40a
MG
68
69This library is free software; you can redistribute it and/or modify
70it under the same terms as Perl itself, either Perl version 5.20.1 or,
71at your option, any later version of Perl 5 you may have available.
72
73
74=cut
This page took 0.014312 seconds and 4 git commands to generate.