App::MechaCPAN::Perl - Mechanize the installation of Perl.
# Install 5.24 into local/ 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.
perl
local/
There is only a single public function that should be called. This will install the version of perl given in $version using the options in \%opts. The options available are listed in the arguments section below.
$version
\%opts
$version is either 0 or 1 parameter:
By default, perl is compiled without threads. If you'd like to enable threads, use this argument.
By default, perl will generate a libperl.a file. If you need libperl.so, then use this argument.
Giving this options will change the mode of operation from installing perl into local/ to generating a reusable, relocatable perl archive. This uses the same parameters (i.e. "devel" and "threads") to generate the binary, although do note that the lib/ directory is always included unless "skip-lib" is provided. The archive name will generally reflect what systems it can run on. Because of the nature of how perl builds binaries, it cannot guarantee that it will work on any given system, but if will have the best luck if you use it on the same version of a distribution.
lib/
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.
App::MechaCPAN::Perl
How many make jobs to use when running make. The code must guess if make supports running multiple jobs, and as such, it may not work for all versions of make. Defaults to 2.
Test for perl are ran by default. If you are sure that the tests will pass and you want to save some time, you can skip the testing phase with this option.
As an alternative to telling App::MechaCPAN::Perl to use tests or not, App::MechaCPAN::Perl can try to be clever and guess if it needs to run tests. If there is a .perl-version file and it is the same version that is being installed, then tests will be skips. The thinking is that if there is a .perl-version file, then it is likely that perl has been installed and tested before.
.perl-version
smart-tests are off by default, but are enabled by App::MechaCPAN::Deploy when there is a cpanfile.snapshot file. See "smart-tests" in App::MechaCPAN::Install.
smart-tests
cpanfile.snapshot
Since perl and modules will be installed by App::MechaCPAN into local/, by default local/ will be added to @INC. This means that if you use the local/ installed perl you do not need to use local::lib or other @INC tricks. If you want to suppress this behavior, use this flag.
@INC
If a lib/ directory exists in the same directory as the local/ directory, then lib/ will also bee added to @INC. This is helpful if you're installing to run an application that includes a lib/ directory. If you do not want this to be added, use this flag.
By default, perl will not compile a development version without -Dusedevel passed to configure. This adds that flag to the configure step so that perl will install unstable development versions. This is NOT recommended except for testing.
Building perl from scratch on Win32 is nothing like building it on other platforms. At this point, the perl command does not work on Win32.
Jon Gentle <cpan@atrodo.org>
Copyright 2017- Jon Gentle
This is free software. You may redistribute copies of it under the terms of the Artistic License 2 as published by The Perl Foundation.
To install App::MechaCPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MechaCPAN
CPAN shell
perl -MCPAN -e shell install App::MechaCPAN
For more information on module installation, please visit the detailed CPAN module installation guide.