diff options
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/Makefile.PL b/Makefile.PL index f9054cc21..59ed8f2cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,7 +15,14 @@ use 5.10.1; use strict; use warnings; -use lib qw(. lib local/lib/perl5); + +use File::Basename; +use File::Spec; +BEGIN { + require lib; + my $dir = File::Spec->rel2abs(dirname(__FILE__)); + lib->import($dir, File::Spec->catdir($dir, "lib"), File::Spec->catdir($dir, qw(local lib perl5))); +} use ExtUtils::MakeMaker 6.55; use constant BUGZILLA_VERSION => $ENV{BUGZILLA_VERSION} // 42; @@ -29,28 +36,6 @@ BEGIN { } } -# META.json and META.yml exist only for the benefit of older -# installs where cpanm can't get the optional features out of Makefile.PL -# Unfortunately having META.json and META.yml commited to the repo is weird -# and MakeMaker always prefers their content to the internal data (unless CPAN::META -# is not installed). -# Since we (Bugzilla) require this cludge, we hide the files from MakeMaker. -BEGIN { - warn "Hiding META.{json,yml} from MakeMaker...\n"; - rename( 'META.json', 'META.json.hide' ) || unlink("META.json"); - rename( 'META.yml', 'META.yml.hide' ) || unlink("META.yml"); - - if (!eval { ExtUtils::MakeMaker->VERSION('6.57_07') }) { - warn "WARNING: ExtUtils::MakeMaker should be at least 6.57_07 in order to support updating META.json files\n"; - } -} - -END { - warn "Unhiding META.{json,yml}...\n"; - rename( 'META.json.hide', 'META.json' ); - rename( 'META.yml.hide', 'META.yml' ); -} - # PREREQ_PM my %requires = ( 'CGI' => '<= 3.63', |