The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::MechaCPAN::Deploy - Mechanize the deployment of CPAN things.

SYNOPSIS

  # Install perl and everything from the cpanfile into local/
  # If cpanfile.snapshot exists, it will be consulted exclusivly
  user@host:~$ mechacpan deploy
  user@host:~$ mechacpan deploy git://git@example.com/MyApp.git
  user@host:~$ zhuli do the thing

DESCRIPTION

Deploy

  user@host:~$ mechacpan deploy

The deploy command is used for automating a deployment. It will install both perl and all the modules specified from the cpanfile.

cpanfile.snapshot

If there is a cpanfile.snapshot that was created by Carton, deploy will treat the modules listed in the snapshot file as the only modules available to install. If a module has a dependency not listed in the snapshot, the deployment will fail.

The option smart-tests is enabled by default when there is a cpanfile.snapshot file. See "smart-tests" in App::MechaCPAN::Install for more details.

Methods

go( \%opts, $cpanfile )

This is the entry point into deployment. It will deploy perl and modules into the local directory of the current directory. $cpanfile is optional and does not have to provided. If it is provided, it needs to be either a path to a directory that contains a file named cpanfile or the path to a file that can be used as a cpanfile.

$cpanfile can also refer to a git repository. In this case, App:MechaCPAN::Deploy will attempt to clone the repository if it's not already and checkout the branch specified branch if given. If there is a cpanfile in the checked out repository or inside a top-level directory, then that cpanfile and directory will be used.

The options available are listed below.

Arguments

skip-perl

The skip-perl boolean option will force deploy to not install perl, only the modules.

  # Examples of skip-perl
  mechacpan deploy --skip-perl

update

Determines what to do with the installation of top-level dependencies. By default, deploy does not update the immediate prerequisites in the cpanfile. This overrides the same option in App::MechaCPAN::Install. See update in App::MechaCPAN::Install.

AUTHOR

Jon Gentle <cpan@atrodo.org>

COPYRIGHT

Copyright 2017- Jon Gentle

LICENSE

This is free software. You may redistribute copies of it under the terms of the Artistic License 2 as published by The Perl Foundation.

SEE ALSO

App::cpanminus
local::lib
Carton
CPAN
plenv
App::perlbrew