package Gruntmaster::App;

use 5.014000;
use warnings;

our $VERSION = '5999.000_004';

use App::Cmd::Setup '-app';
use Gruntmaster::Data;

sub allow_any_unambiguous_abbrev () { 1 }
sub default_command { 'commands' } # Show usage when called without arguments

sub global_opt_spec {
	(['table'   => 'hidden', {one_of => [
		['contests|ct|c' => 'Act on contests'],
		['jobs|j'        => 'Act on jobs'],
		['problems|pb|p' => 'Act on problems'],
		['users|us|u'    => 'Act on users']]}])
}

sub table { shift->global_options->{table} }

Gruntmaster::Data::init $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:';

1;
__END__

=encoding utf-8

=head1 NAME

Gruntmaster::App - command-line interface to the Gruntmaster 6000 database

=head1 SYNOPSIS



=head1 DESCRIPTION



=cut
