diff options
author | Guillem Jover <guillem@debian.org> | 2018-07-28 03:13:05 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-07-30 06:30:04 +0200 |
commit | ee2e18800f5fe0c63df39202586f38e28c00e860 (patch) | |
tree | 7d0198619f6658ff9b8a03ed526af856d0a4f2b0 /scripts/Build.PL.in | |
parent | 1d0be95366c19fbc88c891dbedf7613aedbbdea5 (diff) | |
download | dpkg-ee2e18800f5fe0c63df39202586f38e28c00e860.tar.gz |
perl: Make Build.PL check Module::Build availability at run-time
Doing a normal import via use, means that we need the module to be
present for the unit tests, when we only need it as part of the
distribution process.
Diffstat (limited to 'scripts/Build.PL.in')
-rw-r--r-- | scripts/Build.PL.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/Build.PL.in b/scripts/Build.PL.in index 40de90e41..2f81260bd 100644 --- a/scripts/Build.PL.in +++ b/scripts/Build.PL.in @@ -3,7 +3,11 @@ use strict; use warnings; -use Module::Build (); +eval { + require Module::Build; +} or do { + die "error: Missing Module::Build module, cannot proceed.\n"; +}; if (-e 'Build.PL.in') { die "error: This is an in-tree build, not a proper perl distribution.\n" . |