[Bps-public-commit] r16856 - Prophet/trunk/lib/Prophet/CLI

jesse at bestpractical.com jesse at bestpractical.com
Sat Nov 15 21:20:59 EST 2008


Author: jesse
Date: Sat Nov 15 21:20:59 2008
New Revision: 16856

Modified:
   Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm

Log:
* hacky workaround for run_command

Modified: Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm	Sat Nov 15 21:20:59 2008
@@ -24,9 +24,10 @@
 };
 
 on '' => sub {
-    if ($self->context->has_arg('version')) { run_command("Version") }
-    elsif( $self->context->has_arg('help') ){ run_command("Help") }
-    else { run_command('Shell') }
+    my $self = shift;
+    if ($self->context->has_arg('version')) { run_command("Version")->($self) }
+    elsif( $self->context->has_arg('help') ){ run_command("Help")->($self) }
+    else { run_command('Shell')->($self) }
 };
 
 on [ ['create', 'new'] ]         => run_command("Create");



More information about the Bps-public-commit mailing list