]>
iEval git - gruntmaster-data.git/blob - lib/Gruntmaster/App/Command/Get.pm
cba5b68d8695b74030d6304fa224ef6ac8f13479
1 package Gruntmaster
::App
::Command
::Get
;
6 our $VERSION = '5999.000_016';
8 use Gruntmaster
::App
'-command';
11 sub usage_desc
{ '%c [-cjpu] get id column' }
14 my ($self, $opt, $args) = @_;
16 $self->usage_error('No table selected') unless $self->app->table;
17 $self->usage_error('Wrong number of arguments') if @args != 2;
21 my ($self, $opt, $args) = @_;
22 my ($obj, $col) = @
$args;
23 say db
->select($self->app->table, $col, {id
=> $obj})->flat
33 Gruntmaster::App::Command::Get - get a property of an object
40 gm -p get aplusb level
43 gm -c get test_ct description
44 # This is a <b>test</b> contest.<br>
45 # Nothing to see here.
47 gm -j get 100 result_text
52 The get command takes two arguments: an object id and a property name,
53 and returns the value of that property.
61 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
63 =head1 COPYRIGHT AND LICENSE
65 Copyright (C) 2014-2016 by Marius Gavrilescu
67 This library is free software; you can redistribute it and/or modify
68 it under the same terms as Perl itself, either Perl version 5.20.1 or,
69 at your option, any later version of Perl 5 you may have available.
This page took 0.044024 seconds and 3 git commands to generate.