]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/App.pm
Replace gruntmaster-* scripts with App::Cmd-based gm
[gruntmaster-data.git] / lib / Gruntmaster / App.pm
diff --git a/lib/Gruntmaster/App.pm b/lib/Gruntmaster/App.pm
new file mode 100644 (file)
index 0000000..f61d145
--- /dev/null
@@ -0,0 +1,43 @@
+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
This page took 0.019896 seconds and 4 git commands to generate.