[Bps-public-commit] r15820 - in App-CLI/trunk: . lib/App
clkao at bestpractical.com
clkao at bestpractical.com
Mon Sep 8 07:11:25 EDT 2008
Author: clkao
Date: Mon Sep 8 07:11:24 2008
New Revision: 15820
Removed:
App-CLI/trunk/Makefile
Modified:
App-CLI/trunk/ (props changed)
App-CLI/trunk/lib/App/CLI.pm
App-CLI/trunk/lib/App/CLI/Command.pm
Log:
r299 at mtl: clkao | 2005-06-07 02:28:02 +0800
blah
Modified: App-CLI/trunk/lib/App/CLI.pm
==============================================================================
--- App-CLI/trunk/lib/App/CLI.pm (original)
+++ App-CLI/trunk/lib/App/CLI.pm Mon Sep 8 07:11:24 2008
@@ -1,5 +1,5 @@
package App::CLI;
-our $VERSION = 0.10;
+our $VERSION = 0.01;
use strict;
use warnings;
@@ -29,7 +29,9 @@
=head1 DESCRIPTION
-
+C<App::CLI> dispatches CLI (command line interface) based commands
+into command classes. It also supports subcommand and per-command
+options.
=cut
@@ -122,6 +124,10 @@
return sort map { ($_) = m{^\Q$dir\E/(.*)\.pm}; lc($_) } glob("$dir/*.pm");
}
+=head1 TODO
+
+More documentation
+
=head1 SEE ALSO
L<App::CLI::Command>
Modified: App-CLI/trunk/lib/App/CLI/Command.pm
==============================================================================
--- App-CLI/trunk/lib/App/CLI/Command.pm (original)
+++ App-CLI/trunk/lib/App/CLI/Command.pm Mon Sep 8 07:11:24 2008
@@ -1,4 +1,35 @@
package App::CLI::Command;
+use strict;
+use warnings;
+
+=head1 NAME
+
+App::CLI::Command - Base class for App::CLI commands
+
+=head1 SYNOPSIS
+
+ package MyApp;
+ use base 'App::CLI';
+
+ package main;
+
+ MyApp->dispatch;
+
+ package MyApp::Help;
+ use base 'App::CLI::Command';
+
+ sub options {
+ ('verbose' => 'verbose');
+ }
+
+ sub run {
+ my ($self, $arg) = @_;
+ }
+
+=head1 DESCRIPTION
+
+
+=cut
use constant subcommands => ();
use constant options => ();
@@ -33,4 +64,27 @@
}
}
+=head1 TODO
+
+More documentation
+
+=head1 SEE ALSO
+
+L<App::CLI>
+
+=head1 AUTHORS
+
+Chia-liang Kao E<lt>clkao at clkao.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2005 by Chia-liang Kao E<lt>clkao at clkao.orgE<gt>.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+See L<http://www.perl.com/perl/misc/Artistic.html>
+
+=cut
+
1;
More information about the Bps-public-commit
mailing list