NAME

App::Multigit::Script - Common behaviour for scripts

DESCRIPTION

If you use App::Multigit::Script, some things are taken care of for you, and some things can be done on request.

AUTOMATIC BEHAVIOUR

The default behaviour is to

Use Getopt::Long to handle --workdir. This changes directory and is part of the internal communication between mg itself and your script.
Also handle --help, by running Pod::Usage against your script.
Read STDIN for a list of directories to work against, if appropriate

FUNCTIONS

import

Not your common or garden import. This does the aforementioned things, and exports a %options into your script's namespace (i.e. main).

get_default_options

Returns a hash containing the standard options for all mg scripts.

read_stdin

If STDIN is connected to a pipe or something, this slurps it and uses it as the list of selected repos. See @SELECTED_REPOS in App::Multigit.

AUTHOR

Alastair McGowan-Douglas, <altreus at perl.org>

BUGS

Please report bugs on the github repository https://github.com/Altreus/App-Multigit.

LICENSE

Copyright 2015 Alastair McGowan-Douglas.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0