NAME
app-dispatcher - build command line applications in Perl
SYNOPSIS
app-dispatcher [-v] [-n] [-f] [-i dirs] Your::Class
DESCRIPTION
app-dispatcher is a tool for constructing command line applications written in Perl. It is specifically designed to handle applications with multiple sub-commands and will generate code to display usage text, option and argument validation, and command dispatching.
What app-dispatcher does is load 'lib/Your/Class.pm' and all modules found under 'lib/Your/Class/' and generates the file 'lib/Your/Class/Dispatcher.pm'. Your application script then becomes as simple as the following:
#!/usr/bin/perl
use Your::Class::Dispatcher;
Your::Class::Dispatcher->run;
The only runtime dependency that 'Your::Class::Dispatcher' needs to run is Getopt::Long::Descriptive(3p), which you should add to your Makefile.PL and/or Build.PL script.
Note that app-dispatcher is a code generation tool. This means your command's argument and option processing will not change when you modify your command classes, until you re-run app-dispatcher.
See App::Dispatcher::Tutorial(3p) for details of how your command classes should be written.
OPTIONS
- --help
-
Print usage message and exit.
- --inc-dirs, -i
-
A comma-separated list of directories to search in. Defaults to 'lib'.
- --verbose, -v
-
Print the generated code to standard output during execution.
- --dry-run, -n
-
Create and evaluate the dispatch class but don't actually write the file to disk.
- --force, -f
-
Force the overwriting of writeable files. If this option is not set then app-dispatcher will complain and exit if lib/Your/Class/Dispatcher.pm exists and is writeable.
SEE ALSO
App::Dispatcher(3p), App::Dispatcher::Tutorial(3p)
AUTHOR
Mark Lawrence <nomad@null.net>
COPYRIGHT AND LICENSE
Copyright 2011 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.