Replace gruntmaster-* scripts with App::Cmd-based gm
[gruntmaster-data.git] / lib / Gruntmaster / App.pm
1 package Gruntmaster::App;
2
3 use 5.014000;
4 use warnings;
5
6 our $VERSION = '5999.000_004';
7
8 use App::Cmd::Setup '-app';
9 use Gruntmaster::Data;
10
11 sub allow_any_unambiguous_abbrev () { 1 }
12 sub default_command { 'commands' } # Show usage when called without arguments
13
14 sub global_opt_spec {
15 (['table' => 'hidden', {one_of => [
16 ['contests|ct|c' => 'Act on contests'],
17 ['jobs|j' => 'Act on jobs'],
18 ['problems|pb|p' => 'Act on problems'],
19 ['users|us|u' => 'Act on users']]}])
20 }
21
22 sub table { shift->global_options->{table} }
23
24 Gruntmaster::Data::init $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:';
25
26 1;
27 __END__
28
29 =encoding utf-8
30
31 =head1 NAME
32
33 Gruntmaster::App - command-line interface to the Gruntmaster 6000 database
34
35 =head1 SYNOPSIS
36
37
38
39 =head1 DESCRIPTION
40
41
42
43 =cut
This page took 0.023505 seconds and 5 git commands to generate.