Skip to content

Commit bed3671

Browse files
committed
Refresh "cpanfile" from Makefile.PL, to allow use on Windows.
It had been requesting IO::Pty on Windows, which fails. Among other changes, this demotes module "Readonly" from "requires" to "recommends"; to compensate, it changes the GitHub Actions cpanm invocations to install "recommends" and "suggests".
1 parent a88e279 commit bed3671

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: perl-actions/[email protected]
3737
with:
3838
cpanfile: "cpanfile"
39-
args: "--configure-timeout=600"
39+
args: "--configure-timeout=600 --with-recommends --with-suggests"
4040
sudo: false
4141
- run: perl Makefile.PL
4242
- run: make test

.github/workflows/macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
uses: perl-actions/[email protected]
3030
with:
3131
cpanfile: "cpanfile"
32-
args: "--configure-timeout=600" # IO-Tty-1.16 exceeded 60s default
32+
# IO-Tty-1.16 exceeded 60s default
33+
args: "--configure-timeout=600 --with-recommends --with-suggests"
3334
sudo: false
3435
- name: Makefile.PL
3536
run: perl Makefile.PL

cpanfile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
requires 'IO::Pty' => 0;
2-
requires 'Readonly' => 0;
1+
# The cpanfile specification does not explicitly allow testing $^O or $]. cpanm
2+
# tolerates this, but other cpanfile consumers might not.
3+
if ( $^O ne 'MSWin32' ) {
4+
requires 'IO::Pty', '1.08'; # not entirely required; see Makefile.PL
5+
}
6+
else {
7+
requires 'Win32', '0.27';
8+
requires 'Win32::Process', '0.14';
9+
requires 'Win32::ShellQuote';
10+
requires 'Win32API::File', '0.0901';
11+
if ( $] >= 5.021006 ) {
12+
requires 'Win32API::File', '0.1203';
13+
}
14+
}
15+
on 'test' => sub {
16+
requires 'Test::More', '0.47';
17+
recommends 'Readonly';
18+
};
319
on 'develop' => sub {
4-
requires 'Readonly';
520
requires 'Test::Pod::Coverage';
621
requires 'Pod::Simple';
722
requires 'Test::Pod';

0 commit comments

Comments
 (0)