Skip to content

Commit fd31535

Browse files
arodlandbingos
authored andcommitted
Eliminate an ancient, unneeded, dangerous call to Carp::longmess (#285)
WriteMakefile is calling `Carp::longmess("")` to generate a call stack, and searching it for "runsubdirpl". This is (I believe) to check for a condition where EUMM was upgraded during the process of installing dependencies for a module, and the old and new versions are incompatible in their handling of something or other. But runsubdirpl was removed sometime between EUMM 5.18 and 5.21, and 5.21 shipped with perl 5.002 in 1996. Therefore this condition can only happen with a deeply unsupported version of perl. Calling Carp::longmess to generate a stacktrace is unnecessarily expensive, and also fraught with peril -- due to long-standing perl bugs, it's possible for perl to crash when Carp accesses @db::args to populate the stacktrace (ref CPAN RT#72467, perl RT#104074, perl RT#125907), and this has in fact happened with the Makefile.PLs for net-snmp and XML-Parser in the past. Since this check has outlived its usefulness, remove it so it can't make trouble.
1 parent 108980d commit fd31535

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/ExtUtils/MakeMaker.pm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -652,11 +652,6 @@ END
652652
}
653653
}
654654

655-
# This is for old Makefiles written pre 5.00, will go away
656-
if ( Carp::longmess("") =~ /runsubdirpl/s ){
657-
carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
658-
}
659-
660655
my $newclass = ++$PACKNAME;
661656
local @Parent = @Parent; # Protect against non-local exits
662657
{

0 commit comments

Comments
 (0)