Skip to content

Commit 1e41dcd

Browse files
authored
Merge pull request #19 from happy-barney/hpb/dependencies-makefile-pl
Install dependencies also when distribution uses Makefile.PL
2 parents 2552a7c + cf5c777 commit 1e41dcd

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

bin/cpan-install-dist-deps

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@
33
set -e -u -o pipefail
44

55
main() (
6-
[[ -e cpanfile ]] &&
7-
cpm-install "$@"
6+
for file in cpanfile Build.PL Makefile.PL; do
7+
[[ -e $file ]] || continue
88

9-
[[ -e Build.PL ]] &&
10-
build-and-install-deps
9+
case $file in
10+
Build.PL ) build-and-install-deps "$@" ;;
11+
cpanfile ) cpm-install --cpanfile $file "$@" ;;
12+
Makefile.PL)
13+
perl $file
14+
cpm-install --metafile MYMETA.json "$@"
15+
;;
16+
esac
17+
18+
break;
19+
done
1120

1221
true
1322
)
1423

1524
cpm-install() (
1625
cpm install -g \
17-
--cpanfile cpanfile \
1826
--with-recommends \
1927
--with-suggests \
2028
--show-build-log-on-failure \

0 commit comments

Comments
 (0)