summaryrefslogtreecommitdiff
path: root/lib/Carton/Doc/Install.pod
blob: c9697e18c9466125e21e42f61760a3d928e279b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
=head1 NAME

Carton::Doc::Install - Install the dependencies

=head1 SYNOPSIS

  carton install [--deployment] [--path=PATH]

=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

In either way, if you run C<carton install> for the first time
(i.e. I<carton.lock> does not exist), carton will fetch all the
modules specified, resolve dependencies and install all required
modules from CPAN.

If I<carton.lock> file does exist, carton will still try to install
modules specified or updated in I<cpanfile>, but uses I<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 I<carton.lock> file. It is important
to add I<carton.lock> 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<carton.lock> exists, carton will fetch all remote modules and use
the dependencies specified in the I<carton.lock> instead of resolving
dependencies.

=head1 OPTIONS

=over 4

=item --deployment

Force the deployment mode and carton will ignore I<cpanfile> contents.

=item --path

Specify the path to install modules to. Defaults to I<local> in the current directory.

=back