Carton...nstall(3pm)
β¨ NAME β¨
Carton::Doc::Install β the one that installs ur dependencies, bestie π (it's a 3pm page, from the User Contributed Perl Documentation, iykyk)
π SYNOPSIS π
carton install [--deployment] [--cached] [--path=PATH] [--without develop]
πΈ DESCRIPTION πΈ
Okay so, this command installs the dependencies for ur application. It has two modes and honestly the behavior is a little different in each one, so pay attention π
π¦ DEVELOPMENT MODE π¦
carton install
If u run carton install with no arguments and cpanfile exists, carton will scan ur dependencies from cpanfile and install the modules. Slay.
If u run carton install for the first time (aka cpanfile.snapshot does not exist), carton will fetch all the modules u specified, resolve the dependencies, and install all the required modules from CPAN. Very main character of it.
If the cpanfile.snapshot file does exist, carton will still try to install modules that are specified or updated in cpanfile, but it uses cpanfile.snapshot for the dependency resolution, and then cascades to CPAN. The way that it just... knows. π
carton will analyze all the dependencies and their version information, and it gets saved into the cpanfile.snapshot file. It is important to add the cpanfile.snapshot file into a version controlled repository and commit the changes as u update ur dependencies. fr fr, do not skip this. π
π DEPLOYMENT MODE π
If u specify the --deployment command line option, or if cpanfile.snapshot exists, carton will only use the dependencies specified in cpanfile.snapshot instead of resolving dependencies. No vibes-based resolution, only locked-in facts. periodt. β¨
π OPTIONS π
--deploymentβ forces the deployment mode. Go read "DEPLOYMENT MODE" up there β¬οΈ if u need a refresher.--cachedβ locates distribution tarballs invendor/cacheinstead of fetching them from CPAN mirrors. This requires u to runcarton bundlebefore the deployment, and to commit or sync the content of thevendordirectory over to the other host u runcarton installon. Bestie, this is a whole workflow, respect it. π«Ά--cpanfileβ specifies the alternate path forcpanfile. By default,carton installwill look for the filecpanfilein the current directory, then upwards till the root directory, in case the command runs from a sub directory.
Carton assumes the directory where ur cpanfile (or altenate path) exists is the project root directory, and will look for the snapshot file as well as the install directory (local) and vendor/cache relative to it. Iconic, honestly.
--pathβ specifies the path to install modules to. Defaults tolocalin the directory relative to wherecpanfileis.
NOTE: this option, as of version 1.0, is not preserved across multiple runs ofcarton installor other commands such ascarton listorcarton exec. U can choose to set the path in thePERL_CARTON_PATHenvironment variable to persist it across commands. Lowkey annoying but that's the deal π
--withoutβ by default,carton installwill install all the phases for dependencies, includingdevelop. U can specify phases or features to exclude, in the comma separated list.
carton install --deployment --without develop
NOTE:--withoutfor the initial installation (withoutcpanfile.snapshot) is not supported at this moment. π«
and that's the whole page bestie, ur so welcome π
This cutie was served up by perl v5.34.0, dated 2022-05-12, and it's the Carton...nstall(3pm) page from the User Contributed Perl Documentation. Now go install something and slay β¨π
π
π¦ where this page comes from
- debian bookworm: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms