[Bps-public-commit] r16450 - in Prophet/branches/class-dispatch: . lib/Prophet/CLI
sartak at bestpractical.com
sartak at bestpractical.com
Tue Oct 21 15:00:37 EDT 2008
Author: sartak
Date: Tue Oct 21 15:00:35 2008
New Revision: 16450
Modified:
Prophet/branches/class-dispatch/ (props changed)
Prophet/branches/class-dispatch/lib/Prophet/CLI.pm
Prophet/branches/class-dispatch/lib/Prophet/CLI/Dispatcher.pm
Log:
r74316 at onn: sartak | 2008-10-21 15:00:09 -0400
Various small fixes for dispatch
Modified: Prophet/branches/class-dispatch/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/branches/class-dispatch/lib/Prophet/CLI.pm (original)
+++ Prophet/branches/class-dispatch/lib/Prophet/CLI.pm Tue Oct 21 15:00:35 2008
@@ -96,7 +96,7 @@
die "The command you ran, '$command', could not be found. Perhaps running '$0 help' would help?\n" unless $dispatch->has_matches;
- $dispatch->run;
+ $dispatch->run($dispatcher);
}
=head2 invoke outhandle, ARGV_COMPATIBLE_ARRAY
Modified: Prophet/branches/class-dispatch/lib/Prophet/CLI/Dispatcher.pm
==============================================================================
--- Prophet/branches/class-dispatch/lib/Prophet/CLI/Dispatcher.pm (original)
+++ Prophet/branches/class-dispatch/lib/Prophet/CLI/Dispatcher.pm Tue Oct 21 15:00:35 2008
@@ -47,11 +47,13 @@
return sub {
my $self = shift;
my $class = $self->class_name($name);
+ Prophet::App->require($class);
$class->new(cli => $self->cli)->run;
};
}
sub class_name {
+ my $self = shift;
my $command = shift;
return "Prophet::CLI::Command::$command";
}
More information about the Bps-public-commit
mailing list