Skip to content

Commit ccd24b3

Browse files
committed
install dependencies from Module::Build
cpm only supports cpanfile, but not reading a Build.PL script like cpanm does, so we need to run it and use the build-in installation. Leon T tells me this is not the best way of doing it, but he concurs it's the only way unless cpm supports this format, or we use cpanm.
1 parent a2a226f commit ccd24b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/cpan-install-dist-deps

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ set -eux
55
if [[ -e cpanfile ]];then
66
cpm install -g --cpanfile cpanfile --with-recommends --with-suggests --show-build-log-on-failure "$@"
77
fi
8+
9+
if [[ -e Build.PL ]]; then
10+
# This will install both build and dist deps
11+
perl Build.PL
12+
PERL_MM_USE_DEFAULT=1 ./Build installdeps --cpan_client 'cpm install -g --show-build-log-on-failure' || true
13+
fi

0 commit comments

Comments
 (0)