WARNING

This software is under the heavy development and considered ALPHA quality till the version hits v1.0.0. Things might be broken, not all features have been implemented, and APIs will be likely to change. YOU HAVE BEEN WARNED.

DESCRIPTION

carton is a command line tool to track the Perl module dependencies for your Perl application. The managed dependencies are tracked in a carton.lock file, which is meant to be version controlled, and the lock file allows other developers of your application will have the exact same versions of the modules.

TUTORIAL

Initializing the environment

carton will use the .carton directory for local configuration and the local directory to install modules into. You're recommended to exclude these directories from the version control system.

The modules are installed into your local directory, and the dependencies tree and version information are analyzed and saved into carton.lock in your directory.

Make sure you add carton.lock to your version controlled repository and commit changes as you update dependencies. This will ensure that other developers on your app, as well as your deployment environment, use exactly the same versions of the modules you just installed.

You can aternatively install modules adhoc from the command line, without managing the build file at all.

> carton install Devel::NYTProf
> carton install AnyEvent::Redis

carton will install these modules into local directory in the same way, and also can track and analyze the dependencies.

Deploying your application

Once you've done installing all the dependencies, you can push your application directory to a remote machine (excluding local and .carton) and run the following command:

> carton install

This will look at the carton.lock and install the exact same versions of the dependencies into local, and now your application is ready to run.

Bundling modules

carton can bundle all the tarballs for your dependencies into a directory so that you can even install dependencies that are not available on CPAN, such as internal distribution aka DarkPAN.

> carton bundle

will bundle these tarballs into local/cache directory, and

> carton install --cached

will install modules using this local cache. This way you can avoid a dependency on CPAN meta DB and search.cpan.org at a deploy time, or you can have dependencies onto private CPAN modules aka DarkPAN.