Carton::Doc::Install - Install the dependencies
carton install [--deployment] [--path=PATH] [--without develop]
Install the dependencies for your application. This command has two modes and the behavior is slightly different.
If you run carton install without any arguments and if cpanfile exists, carton will scan dependencies from cpanfile and install the modules.
carton install
In either way, if you run carton install for the first time (i.e. carton.lock does not exist), carton will fetch all the modules specified, resolve dependencies and install all required modules from CPAN.
If carton.lock file does exist, carton will still try to install modules specified or updated in cpanfile, but uses carton.lock for the dependency resolution, and then cascades to CPAN.
carton will analyze all the dependencies and their version information, and it is saved into carton.lock file. It is important to add carton.lock file into a version controlled repository and commit the changes as you update your dependencies.
If you specify the --deployment command line option or the carton.lock exists, carton will fetch all remote modules and use the dependencies specified in the carton.lock instead of resolving dependencies.
--deployment
Force the deployment mode and carton will ignore cpanfile contents.
Specify the path to install modules to. Defaults to local in the current directory.
By default, carton install will install all the phases for dependencies, including develop. You can specify phases or features to exclude, in the comma separated list.
develop
carton install --deployment --without develop
NOTE: --without for the initial installation (without carton.lock) is not supported at this moment.
--without
To install Carton, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Carton
CPAN shell
perl -MCPAN -e shell install Carton
For more information on module installation, please visit the detailed CPAN module installation guide.