perl-module.eclass currently uses ExtUtils::MakeMaker or Module::Build if it detects the files "Makefile.PL" or "Build.PL" during src_configure and "Makefile" or "Build" during src_compile ( and it prefers the M::B version unless PREFER_BUILDPL is set to "no"). Problem: - It is file-based. It doesn't remember the decision (from earlier phases). dev-perl/perl-tk is a EU::MM distribution but also contains an executable "build" script. On case-insensitive filesystem the build process switches from EU::MM during src_configure to M::B during src_compile and unexpected things happen. We should at least add a warning to src_configure if a "./Build" file is found too. Probably the build process should die in this case.
Created attachment 289479 [details] warn if a Build file exists in the EU::MM case
And add a PREFER_BUILDPL check to perl-module_src_compile: @@ -160,17 +188,17 @@ perl-module_src_compile() { - if [[ -f Build ]] ; then + if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile ) && -f Build ]] ; then and set PREFER_BUILDPL to not "yes" in the ebuild if a non-M::B build file exists.
I played around with this a bit, and it's a mess because of the different logic in the phases. Let's leave it as is for now, and re-sort the entire decision tree between the different build systems at the EAPI=7 step.