Building a Perl Project
What This Guide Covers #
For Language versions and other build-environment specific information visit our reference pages:
Perl builds are not available on the OS X environment.
Specifying Perl versions #
Travis CI uses Perlbrew to provide several Perl versions you can test your projects against:
language: perl perl: - "5.30" - "5.28" - "5.26"
These versions specified by
major.minor numbers are aliases to exact patch
levels, which are subject to change. For precise versions pre-installed on the
VM, please consult “Build system information” in the build log.
Perl versions earlier than 5.8 are not supported.
Perl runtimes with threading support #
Some Perls have been compiled with threading support. They have been compiled
with the additional compile flags
5.26-shrplib 5.24-shrplib 5.22-shrplib 5.20-shrplib 5.18-shrplib
Default Build Script #
The default build script varies according to your project:
if your repository has
Build.PLin the root:
perl Build.PL && ./Build test
if your repository has Makefile.PL in the root:
perl Makefile.PL && make test
if neither is found:
Dependency Management #
By default Travis CI use
cpanm to manage your project’s dependencies.
cpanm --quiet --installdeps --notest .
When Overriding Build Commands, Do Not Use
install: key to tweak dependency installation command (for
example, to run cpanm with verbosity flags), do not use
sudo. Travis CI
Environment has Perls installed via Perlbrew in non-privileged user’s
sudo will result in dependencies being installed in unexpected
(for Travis CI Perl builder) locations and they won’t load.
Build Matrix #
For Perl projects,
perl can be given as arrays
to construct a build matrix.
Environment Variables #
The version of Perl a job is using is available as