NAME

App::Pinto::Command::install - install stuff from the repository

VERSION

version 0.080

SYNOPSIS

pinto --root=REPOSITORY_ROOT install [OPTIONS] TARGET...

DESCRIPTION

!! THIS COMMAND IS EXPERIMENTAL !!

Installs packages from the repository into your environment. This is just a thin wrapper around cpanm that is wired to fetch everything from the Pinto repository, rather than a public CPAN mirror.

If the --pull option is given, all prerequisites (including the targets themselves) will be pulled onto the stack before attempting to install them. If any prerequisite cannot be pulled because it does not exist or is blocked by a pin, then the installation will not proceed.

COMMAND ARGUMENTS

Arguments are the things you want to install. These can be package names, distribution paths, URLs, local files, or directories. Look at the cpanm documentation to see all the different ways of specifying what to install.

You can also pipe arguments to this command over STDIN. In that case, blank lines and lines that look like comments (i.e. starting with "#" or ';') will be ignored.

COMMAND OPTIONS

--cpanm-exe PATH
--cpanm PATH

Sets the path to the cpanm executable. If not specified, the PATH will be searched for the executable. At present, cpanm version 1.500 or newer is required.

--cpanm-options NAME=VALUE
-o NAME=VALUE

These are options that you wish to pass to cpanm. Do not prefix the option NAME with a '-'. You can pass any option you like, but the --mirror and --mirror-only options will always be set to point to the Pinto repository.

--dry-run

Go through all the motions, but do not actually commit any changes to the repository. Use this option to see how the command would potentially impact the stack. This only has effect when using the --pull option.

--local-lib DIRECTORY
-l DIRECTORY

Shortcut for setting the --local-lib option on cpanm. Same as --cpanm-options local-lib=DIRECTORY or -o l=DIRECTORY.

--local-lib-contained DIRECTORY
-L DIRECTORY

Shortcut for setting the --local-lib-contained option on cpanm. Same as --cpanm-options local-lib-containted=DIRECTORY or -o L=DIRECTORY.

--message=TEXT
-m TEXT

Use TEXT as the revision history log message. This is only relevant if you also set the --pull option. If you do not use --message option, then you will be prompted to enter the message via your text editor. Use the EDITOR or VISUAL environment variables to control which editor is used. A log message is not required whenever the --dry-run option is set, or if the action did not yield any changes to the repository.

--pull

Recursively pull prerequisite packages (or the targets themselves) onto the stack before installing. Without the --pull option, all prerequisites must already be on the stack. See the pull command to explicitly pull packages onto a stack or the merge command to merge packages from one stack to another.

--stack=NAME
-s NAME

Use the stack with the given NAME as the repository index. When used with the --pull option, this also determines which stack prerequisites will be pulled onto. Defaults to the name of whichever stack is currently marked as the default stack. Use the stacks command to see the stacks in the repository.

USING cpan OR cpanm DIRECTLY

On the surface, A Pinto repository looks like an ordinary CPAN repository, so you can use any client to install modules. All you have to do is "point" it at the URL of your Pinto repository. Each client has a slightly different interface for setting the URL.

For cpanm, use the --mirror and --mirror-only options like this:

$> cpanm --mirror file:///path/to/repo --mirror-only Some::Package ...

For cpan, set the urllist config option via the shell like this:

$> cpan
cpan[1]> o conf urllist file:///path/to/repo
cpan[2]> reload index
cpan[3]> install Some::Package
cpan[4]> o conf commit     # If you want to make the change permanent

Pointing your client at the top of your repository will install modules from the default stack. To install from a particular stack, just add it to the URL. For example:

file:///path/to/repo                # Install from default stack
file:///path/to/repo/stacks/dev     # Install from "dev" stack
file:///path/to/repo/stacks/prod    # Install from "prod" stack

If your repository does not have a default stack then you must specify the full URL to one of the stacks as shown above.

COMPATIBILITY

The install does not support some of the newer features found in version 1.6 (or later) of cpanm, such as installing from a Git repository, installing development releases, or using complex version expressions. If you pass any of those as arguments to this command, the behavior is unspecified.

CONTRIBUTORS

  • Cory G Watson <gphat@onemogin.com>

  • Jakob Voss <jakob@nichtich.de>

  • Jeff <jeff@callahan.local>

  • Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>

  • Jeffrey Thalhammer <jeff@imaginative-software.com>

  • Karen Etheridge <ether@cpan.org>

  • Michael G. Schwern <schwern@pobox.com>

  • Steffen Schwigon <ss5@renormalist.net>

  • Wolfgang Kinkeldei <wolfgang@kinkeldei.de>

  • Yanick Champoux <yanick@babyl.dyndns.org>

AUTHOR

Jeffrey Ryan Thalhammer <jeff@stratopan.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jeffrey Ryan Thalhammer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.