Jesse Vincent > Prophet-0.69_01 > Prophet::CLI

Download:
Prophet-0.69_01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  6
Open  2
View/Report Bugs
Source   Latest Release: Prophet-0.751

_record_cmd

handles the subcommand for a particular type

dispatcher_class -> Class

Returns the dispatcher used to dispatch command lines. You'll want to override this in your subclass.

run_one_command

Runs a command specified by commandline arguments given in an ARGV-like array of argumnents and key value pairs . To use in a commandline front-end, create a Prophet::CLI object and pass in your main app class as app_class, then run this routine.

Example:

 my $cli = Prophet::CLI->new({ app_class => 'App::SD' });
 $cli->run_one_command(@ARGV);

get_script_name

Return the name of the script that was run. This is the empty string if we're in a shell, otherwise the script name concatenated with a space character. This is so you can just use this for e.g. printing usage messages or help docs that might be run from either a shell or the command line.

syntax highlighting: