Skip to content

Commit

Permalink
Merge pull request #19 from happy-barney/hpb/dependencies-makefile-pl
Browse files Browse the repository at this point in the history
Install dependencies also when distribution uses Makefile.PL
  • Loading branch information
oalders authored Nov 3, 2023
2 parents 2552a7c + cf5c777 commit 1e41dcd
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions bin/cpan-install-dist-deps
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@
set -e -u -o pipefail

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

[[ -e Build.PL ]] &&
build-and-install-deps
case $file in
Build.PL ) build-and-install-deps "$@" ;;
cpanfile ) cpm-install --cpanfile $file "$@" ;;
Makefile.PL)
perl $file
cpm-install --metafile MYMETA.json "$@"
;;
esac

break;
done

true
)

cpm-install() (
cpm install -g \
--cpanfile cpanfile \
--with-recommends \
--with-suggests \
--show-build-log-on-failure \
Expand Down

0 comments on commit 1e41dcd

Please sign in to comment.