summaryrefslogtreecommitdiff
path: root/lib/Carton/Doc/Install.pod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Carton/Doc/Install.pod')
-rw-r--r--lib/Carton/Doc/Install.pod95
1 files changed, 95 insertions, 0 deletions
diff --git a/lib/Carton/Doc/Install.pod b/lib/Carton/Doc/Install.pod
new file mode 100644
index 0000000..df3b58f
--- /dev/null
+++ b/lib/Carton/Doc/Install.pod
@@ -0,0 +1,95 @@
+=head1 NAME
+
+Carton::Doc::Install - Install the dependencies
+
+=head1 SYNOPSIS
+
+ carton install [--deployment] [--cached] [--path=PATH] [--without develop]
+
+=head1 DESCRIPTION
+
+Install the dependencies for your application. This command has two
+modes and the behavior is slightly different.
+
+=head2 DEVELOPMENT MODE
+
+=over 4
+
+=item carton install
+
+If you run C<carton install> without any arguments and if I<cpanfile>
+exists, carton will scan dependencies from I<cpanfile> and install
+the modules.
+
+=back
+
+If you run C<carton install> for the first time
+(i.e. I<cpanfile.snapshot> does not exist), carton will fetch all the
+modules specified, resolve dependencies and install all required
+modules from CPAN.
+
+If I<cpanfile.snapshot> file does exist, carton will still try to install
+modules specified or updated in I<cpanfile>, but uses I<cpanfile.snapshot>
+for the dependency resolution, and then cascades to CPAN.
+
+carton will analyze all the dependencies and their version
+information, and it is saved into I<cpanfile.snapshot> file. It is important
+to add I<cpanfile.snapshot> file into a version controlled repository and
+commit the changes as you update your dependencies.
+
+=head2 DEPLOYMENT MODE
+
+If you specify the C<--deployment> command line option or the
+I<cpanfile.snapshot> exists, carton will only use the dependencies
+specified in the I<cpanfile.snapshot> instead of resolving
+dependencies.
+
+=head1 OPTIONS
+
+=over 4
+
+=item --deployment
+
+Force the deployment mode. See L</"DEPLOYMENT MODE"> above.
+
+=item --cached
+
+Locate distribution tarballs in C<vendor/cache> rather than fetching
+them from CPAN mirrors. This requires you to run C<carton bundle>
+prior to the deployment and commit or sync the content of C<vendor>
+directory to the other host you run C<carton install> on.
+
+=item --cpanfile
+
+Specify the alternate path for cpanfile. By default, C<carton install>
+will look for the file C<cpanfile> in the current directory, then
+upwards till the root directory, in case the command runs from a sub
+directory.
+
+Carton assumes the directory where your cpanfile (or altenate path)
+exists as a project root directory, and will look for the snapshot file as
+well as install directory (C<local>) and C<vendor/cache> relative to it.
+
+=item --path
+
+Specify the path to install modules to. Defaults to I<local> in the
+directory relative to where C<cpanfile> is.
+
+B<NOTE>: this option, as of version 1.0, is not preserved across
+multiple runs of C<carton install> or other commands such as C<carton
+list> or C<carton exec>. You can choose to set the path in
+C<PERL_CARTON_PATH> environment variable to persist it across
+commands.
+
+=item --without
+
+By default, C<carton install> will install all the phases for
+dependencies, including C<develop>. You can specify phases or features
+to exclude, in the comma separated list.
+
+ carton install --deployment --without develop
+
+B<NOTE>: C<--without> for the initial installation (without
+cpanfile.snapshot) is not supported at this moment.
+
+=back