Ioan Rogers > Prophet > Prophet::CLI

Download:
Prophet-0.751.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  6
Open  2
View/Report Bugs
Module Version: 0.751   Source  

NAME ^

Prophet::CLI

VERSION ^

version 0.751

ATTRIBUTES ^

dispatcher_class -> Class

Returns class name of the dispatcher used to dispatch command lines. By default app_class::CLI::Dispatcher is used if it can be loaded otherwise Prophet::CLI::Dispatcher. Override using:

    has '+dispatcher_class' => ( default => 'MyApp::Dispatcher' );

METHODS ^

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.

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2009 by Best Practical Solutions.

This is free software, licensed under:

  The MIT (X11) License

BUGS AND LIMITATIONS ^

You can make new bug reports, and view existing ones, through the web interface at https://rt.cpan.org/Public/Dist/Display.html?Name=Prophet.

CONTRIBUTORS ^

syntax highlighting: