[Bps-public-commit] r16572 - in sd/branches/sd-dispatcher: .
sartak at bestpractical.com
sartak at bestpractical.com
Tue Oct 28 13:18:33 EDT 2008
Author: sartak
Date: Tue Oct 28 13:18:32 2008
New Revision: 16572
Modified:
sd/branches/sd-dispatcher/ (props changed)
sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm
Log:
r74681 at onn: sartak | 2008-10-28 13:18:13 -0400
More concise help rewriting
Modified: sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm
==============================================================================
--- sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm (original)
+++ sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm Tue Oct 28 13:18:32 2008
@@ -3,10 +3,11 @@
use Prophet::CLI::Dispatcher -base;
use Moose;
-on qr'^\?(.*)$' => sub {my $cmd = $1 || ''; run('help'. $cmd, @_); last_rule;};
+# "sd ?about" => "sd help about"
+rewrite qr/^\?(.*)/ => sub { "help $1" };
# 'sd about' -> 'sd help about', 'sd copying' -> 'sd help copying'
-on [ ['about', 'copying'] ] => sub { run("help $1", @_); };
+rewrite [ ['about', 'copying'] ] => sub { "help $1" };
under help => sub {
rewrite [ ['push', 'pull', 'publish', 'server'] ] => 'help sync';
More information about the Bps-public-commit
mailing list