Skip to content

Commit 833e806

Browse files
committed
fix: lower Perl version requirement from v5.40 to v5.38 for CI compatibility
- Update all Perl modules and scripts to use v5.38 instead of v5.40 - Fixes GitHub Actions test failures due to Ubuntu 24.04 only having Perl v5.38.2 - Add comprehensive documentation in README explaining Perl version choice: * Modern features (strict/warnings enabled by default) * GitHub Actions compatibility with Ubuntu 24.04 LTS * Avoids slow Perl installation in CI pipelines * Provides all necessary modern Perl features - Add perlbrew to project dictionary for spell checking - All tests and linting continue to pass with v5.38 Files updated: - lib/TorrustDeploy/App.pm - lib/TorrustDeploy/App/Command/Provision.pm - lib/TorrustDeploy/Provision/OpenTofu.pm - bin/torrust-deploy - t/e2e/provision.t - README.md - project-words.txt
1 parent 75e2701 commit 833e806

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@
55
A modern Perl console application for deploying Torrust Tracker to Hetzner Cloud using Packer,
66
Terraform, and Ansible.
77

8+
## Perl Version Requirement
9+
10+
This project requires **Perl v5.38** or higher. We chose v5.38 specifically because:
11+
12+
- **Modern Perl features**: Enables `strict` and `warnings` by default without explicit `use` statements
13+
- **GitHub Actions compatibility**: v5.38 is the default Perl version in Ubuntu 24.04 LTS
14+
(GitHub Actions runners)
15+
- **No additional CI setup**: Avoids the overhead of installing newer Perl versions in CI, which
16+
can be slow
17+
- **Modern enough**: Provides all the modern Perl features we need for this application
18+
19+
You can check your Perl version with:
20+
21+
```bash
22+
perl -v
23+
```
24+
25+
If you need to install a newer Perl version, consider using [perlbrew](https://perlbrew.pl/) for
26+
local development.
27+
828
## Installation
929

1030
Install cpanminus:

bin/torrust-deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env perl
22

33
# Set up Perl environment with modern features (includes strict and warnings)
4-
use v5.40;
4+
use v5.38;
55

66
# Configure module loading
77
use FindBin qw($Bin); # Import FindBin module and get $Bin variable containing this script's directory

lib/TorrustDeploy/App.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package TorrustDeploy::App;
22

3-
use v5.40;
3+
use v5.38;
44

55
# App::Cmd framework setup - automatically discovers commands in TorrustDeploy::App::Command::*
66
# Commands are found by convention: each .pm file in lib/TorrustDeploy/App/Command/

lib/TorrustDeploy/App/Command/Provision.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package TorrustDeploy::App::Command::Provision;
22

3-
use v5.40;
3+
use v5.38;
44

55
use TorrustDeploy::App -command;
66
use TorrustDeploy::Provision::OpenTofu;

lib/TorrustDeploy/Provision/OpenTofu.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package TorrustDeploy::Provision::OpenTofu;
22

3-
use v5.40;
3+
use v5.38;
44

55
use JSON;
66

project-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Mlocal
2121
netdev
2222
NOPASSWD
2323
opentofu
24+
perlbrew
2425
perlstyle
2526
plugdev
2627
pwauth

t/e2e/provision.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use v5.40;
1+
use v5.38;
22
use Test::More;
33
use Test::Exception;
44
use Capture::Tiny qw(capture);

0 commit comments

Comments
 (0)