Skip to content

Commit 880519e

Browse files
authored
Minor updates (travis-ci#1460)
* Updates * Consistency * Formatting * Tweaks * Update Perl versions * An experiment in providing more info * White space only
1 parent dcceaa1 commit 880519e

File tree

4 files changed

+99
-89
lines changed

4 files changed

+99
-89
lines changed

_data/language-details/perl.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
threading: |
2+
Some Perls have been compiled with threading support. They have been compiled
3+
with the additional compile flags `-Duseshrplib` and `-Duseithreads`:
4+
5+
```
6+
5.26-shrplib
7+
5.24-shrplib
8+
5.22-shrplib
9+
5.20-shrplib
10+
5.18-shrplib
11+
```
12+
modules: |
13+
```
14+
cpanm (App::cpanminus)
15+
Dist::Zilla
16+
Dist::Zilla::Plugin::Bootstrap::lib
17+
ExtUtils::MakeMaker
18+
LWP
19+
Module::Install
20+
Moose
21+
Test::Exception
22+
Test::Kwalitee
23+
Test::Most
24+
Test::Pod
25+
Test::Pod::Coverage
26+
```

user/languages/perl.md

Lines changed: 53 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,122 +4,107 @@ layout: en
44

55
---
66

7-
### What This Guide Covers
7+
<div id="toc"></div>
88

9-
This guide covers build environment and configuration topics specific to Perl projects. Please make sure to read our [Tutorial](/user/tutorial/) and [general build configuration](/user/customizing-the-build/) guides first.
9+
<aside markdown="block" class="ataglance">
1010

11-
Perl builds are not available on the macOS environment.
11+
| Perl | Default |
12+
|:--------------------------------------------|:------------------------------------------|
13+
| [Default `install`](#Dependency-Management) | `cpanm --quiet --installdeps --notest .` |
14+
| [Default `script`](#Default-Build-Script) | Varies |
15+
| [Matrix keys](#Build-Matrix) | `perl`, `env` |
16+
| Support | [Travis CI](mailto:[email protected]) |
1217

13-
## Choosing Perl versions to test against
14-
15-
Perl workers on Travis CI use [Perlbrew](http://perlbrew.pl/) to provide several Perl versions your projects can be tested against. To specify them, use the `perl:` key in your `.travis.yml` file, for example:
18+
Minimal example:
1619

1720
```yaml
1821
language: perl
1922
perl:
2023
- "5.26"
21-
- "5.24"
22-
- "5.22"
23-
- "5.20"
2424
```
2525
{: data-file=".travis.yml"}
2626
27-
A more extensive example:
27+
</aside>
2828
29-
```yaml
30-
language: perl
31-
perl:
32-
- "5.26"
33-
- "5.24"
34-
- "5.22"
35-
- "5.20"
36-
- "5.18"
37-
- "5.16"
38-
```
39-
{: data-file=".travis.yml"}
29+
## What This Guide Covers
4030
41-
As time goes, new releases come out and we upgrade both Perlbrew and Perls, aliases like `5.14` will float and point to different exact versions, patch levels and so on.
31+
{{ site.data.snippets.trusty_note_no_osx }}
4232
43-
For precise versions pre-installed on the VM, please consult "Build system information" in the build log.
33+
Perl builds are not available on the OS X environment.
4434
45-
*Perl versions earlier than 5.8 are not and will not be provided. Please do not list them in `.travis.yml`.*
35+
The rest of this guide covers configuring Perl projects in Travis CI. If you're
36+
new to Travis CI please read our [Getting Started](/user/getting-started/) and
37+
[build configuration](/user/customizing-the-build/) guides first.
4638
47-
### Perl runtimes with `-Duseshrplib`
39+
## Specifying Perl versions
4840
49-
Additionally, some Perls have been compiled with threading support. They have
50-
been compiled with the additional compile flags `-Duseshrplib` and `-Duseithreads`. This are the
51-
versions that are available:
41+
Travis CI uses [Perlbrew](http://perlbrew.pl/) to provide several Perl versions
42+
you can test your projects against:
5243
5344
```yaml
54-
5.26-shrplib
55-
5.24-shrplib
56-
5.22-shrplib
57-
5.20-shrplib
58-
5.18-shrplib
45+
language: perl
46+
perl:
47+
- "5.26"
48+
- "5.24"
49+
- "5.22"
5950
```
6051
{: data-file=".travis.yml"}
6152
53+
These versions specified by `major.minor` numbers are aliases to exact patch
54+
levels, which are subject to change. For precise versions pre-installed on the
55+
VM, please consult "Build system information" in the build log.
6256

63-
## Default Perl Version
64-
65-
If you leave the `perl` key out of your `.travis.yml`, Travis CI will use Perl 5.14.
57+
> Perl versions earlier than 5.8 are not supported.
6658

67-
## Default Test Script
59+
### Perl runtimes with threading support
6860

69-
### Module::Build
61+
{{ site.data.language-details.perl.threading }}
7062

71-
If your repository has Build.PL in the root, it will be used to generate the build script:
63+
## Default Build Script
7264

73-
```bash
74-
perl Build.PL && ./Build test
75-
```
65+
The default build script varies according to your project:
7666

77-
### EUMM
67+
* if your repository has `Build.PL` in the root:
7868

79-
If your repository has Makefile.PL in the root, it will be used like so
80-
81-
```bash
82-
perl Makefile.PL && make test
83-
```
69+
```bash
70+
perl Build.PL && ./Build test
71+
```
72+
* if your repository has Makefile.PL in the root:
8473

85-
If neither Module::Build nor EUMM build files are found, Travis CI will fall back to running
74+
```bash
75+
perl Makefile.PL && make test
76+
```
8677

87-
```bash
88-
make test
89-
```
78+
* if neither is found:
9079

91-
It is possible to override test command as described in the [general build configuration](/user/customizing-the-build/) guide.
80+
```bash
81+
make test
82+
```
9283

9384
## Dependency Management
9485

95-
### Travis CI uses cpanm
96-
97-
By default Travis CI use `cpanm` to manage your project's dependencies. It is possible to override dependency installation command as described in the [general build configuration](/user/customizing-the-build/) guide.
98-
99-
The exact default command is
86+
By default Travis CI use `cpanm` to manage your project's dependencies.
10087

10188
```bash
10289
cpanm --quiet --installdeps --notest .
10390
```
10491

105-
### When Overriding Build Commands, Do Not Use sudo
92+
### When Overriding Build Commands, Do Not Use `sudo`
10693

107-
When overriding `install:` key to tweak dependency installation command (for example, to run cpanm with verbosity flags), do not use sudo.
108-
Travis CI Environment has Perls installed via Perlbrew in non-privileged user $HOME directory. Using sudo will result in dependencies
109-
being installed in unexpected (for Travis CI Perl builder) locations and they won't load.
94+
When overriding `install:` key to tweak dependency installation command (for
95+
example, to run cpanm with verbosity flags), do not use `sudo`. Travis CI
96+
Environment has Perls installed via Perlbrew in non-privileged user's `$HOME`
97+
directory. Using `sudo` will result in dependencies being installed in unexpected
98+
(for Travis CI Perl builder) locations and they won't load.
11099

111100
## Build Matrix
112101

113102
For Perl projects, `env` and `perl` can be given as arrays
114103
to construct a build matrix.
115104

116-
## Environment Variable
105+
## Environment Variables
117106

118-
The version of Perl a job is using is available as:
119-
120-
```
121-
TRAVIS_PERL_VERSION
122-
```
107+
The version of Perl a job is using is available as `TRAVIS_PERL_VERSION`.
123108

124109
## Examples
125110

user/reference/precise.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ to accommodate projects that may need one of those runtimes during the build.
7777

7878
Language-specific workers have multiple runtimes for their respective language (for example, Ruby workers have about 10 Ruby versions/implementations).
7979

80-
### Databases
80+
### Data Stores
8181

8282
- MySQL
8383
- PostgreSQL
@@ -244,31 +244,18 @@ Scons
244244

245245
## Perl VM images
246246

247-
### Perl versions
248-
249247
Perl versions are installed via [Perlbrew](http://perlbrew.pl/).
250-
Those runtimes that end with the `-extras` suffix have been compiled with
251-
`-Duseshrplib` and `-Duseithreads` flags.
252-
These also have aliases with the `-shrplib` suffix.
248+
The default version of Perl is 5.14.
253249

254-
### Pre-installed modules
250+
### Perl runtimes with threading support
255251

256-
cpanm (App::cpanminus)
257-
Dist::Zilla
258-
Dist::Zilla::Plugin::Bootstrap::lib
259-
ExtUtils::MakeMaker
260-
LWP
261-
Module::Install
262-
Moose
263-
Test::Exception
264-
Test::Kwalitee
265-
Test::Most
266-
Test::Pod
267-
Test::Pod::Coverage
252+
{{ site.data.language-details.perl.threading }}
268253

269-
## PHP VM images
254+
### Pre-installed modules
270255

256+
{{ site.data.language-details.perl.modules }}
271257

258+
## PHP VM images
272259

273260
### PHP versions
274261

user/reference/trusty.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,19 @@ thanks to the very powerful [sbt-extras](https://github.com/paulp/sbt-extras)
198198
alternative. `sbt` can dynamically detect and install the sbt version required
199199
by your Scala projects.
200200

201+
## Perl images
202+
203+
Perl versions are installed via [Perlbrew](http://perlbrew.pl/).
204+
The default version of Perl is 5.14.
205+
206+
### Perl runtimes with threading support
207+
208+
{{ site.data.language-details.perl.threading }}
209+
210+
### Pre-installed modules
211+
212+
{{ site.data.language-details.perl.modules }}
213+
201214
## PHP images
202215

203216
[phpenv](https://github.com/phpenv/phpenv) is installed and we pre-install at
@@ -272,7 +285,6 @@ For PHP versions up to 5.6, the following extensions are available:
272285
Please note that these extensions are not enabled by default with the exception
273286
of xdebug.
274287

275-
276288
## Other software
277289

278290
Install other Ubuntu packages using `apt-get`, or add third party PPAs or custom scripts.

0 commit comments

Comments
 (0)