App-MechaCPAN
view release on metacpan or search on metacpan
user@host:~$ mechacpan perl 5.24
The perl command is used to install perl into local/. This removes the
packages dependency on the operating system perl. By default, it tries
to be helpful and include lib/ and local/ into @INC automatically, but
this feature can be disabled. See App::MechaCPAN::Perl for more
details.
Install
user@host:~$ mechacpan install Catalyst
The install command is used for installing specific modules. All
modules are installed into the local/ directory. See See
App::MechaCPAN::Install for more details.
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. If there is
a cpanfile.snapshot that was created by Carton, deploy will treat the
modules lised in the snapshot file as the only modules available to
install. See App::MechaCPAN::Deploy for more details.
OPTIONS
Besides the options that the individual commands take, App::MechaCPAN
takes several that are always available.
--verbose
By default only informational descriptions of what is happening is
shown. Turning verbose on will show every command and all output
produced by running each command. Note that this is not the opposite of
quiet.
--quiet
Using quiet means that the normal information descriptions are hidden.
Note that this is not the opposite of verbose, turning both options on
means no descriptions will be show, but all output from all commands
will be.
--no-log
A log is normally outputted into the local/logs directory. This option
will prevent a log from being created.
--directory=<path>
Changes to a specified directory before any processing is done. This
allows you to specify what directory you want local/ to be in. If this
isn't provided, the current working directory is used instead.
--build-reusable-perl
Giving this options will override the mode of operation and generate a
reusable, relocatable perl archive. This accepts the same parameters as
the Perl command (i.e. "devel" and "threads") to generate the binary.
Note that the lib/ directory is always included unless the --skip-lib
option is included. The archive name will generally reflect what
systems the resuling archive can run on. Because of the nature of how
perl builds binaries, it cannot guarantee that it will work on any
given system. This option will have the best luck if you use it with
the same version of a distribution.
Once you have a reusable binary archive, App::MechaCPAN::Perl can use
that archive as a source file and install the binaries into the local
directory. This can be handy if you are building a lot of identical
systems and only want to build perl once.
The exact parameters included in the archive name are:
* The version built
* The architecture name, as found in the first piece of
$Config{archname}
* The Operating System, as found in $Config{osname}
* Optionally notes if it was built with threads
* The name of the libc used
* The version of the libc used
* The so version of libraries used, with common libaries being
abbreviated
An example archive name would be
perl-v5.36.0-x86_64-linux-glibc-2.35-y1.1n2.0u1.tar.xz
$ENV{MECHACPAN_TIMEOUT}
Every command that App::MechaCPAN runs is given an idle timeout before
it is killed and a failure is returned. This timeout is reset every
time the command outputs to STDOUT or STDERR. Using the environment
variable MECHACPAN_TIMEOUT, you can override or disable this timeout.
It is always in seconds and setting it to 0 will disable it. The
default is 60 seconds.
SCRIPT RESTART WARNING
This module WILL restart the running script IF it's used as a module
(e.g. with use) and the perl that is running is not the version
installed in local/. It does this at two points: First right before
run-time and Second right after a perl is installed into local/. During
restart, App::MechaCPAN will attempt to install itself into local/
unless it was invoked as a fully-contained version of mechacpan.
The scripts and modules that come with App::MechaCPAN are prepared to
handle this. If you use App::MechaCPAN as a module, you should to be
prepared to handle it as well.
This means that any END and DESTROY blocks WILL NOT RUN. Anything
created with File::Temp will be cleaned up, however.
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 <https://github.com/tokuhirom/plenv>
( run in 0.680 second using v1.01-cache-2.11-cpan-39bf76dae61 )