From: Craig A. Berry Date: Thu, 4 Jun 2009 13:10:50 +0000 (-0500) Subject: MakeMaker must handle an empty $self->{LIBS} array. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8415bfe009d4d13c8d970b3e09ff685cfe5dc0d2;p=p5sagit%2Fp5-mst-13.2.git MakeMaker must handle an empty $self->{LIBS} array. 6.52 broke the build on VMS because the Makefile.PL for Time::HiRes sends C<'LIBS' => []> to WriteMakefile() and the code to handle that case was removed in a refactor, so we ended up not linking against the main perl library (perlshr.exe on VMS). More details and an upstream submission of this patch are at: https://rt.cpan.org/Ticket/Display.html?id=46633 --- diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 9ee5abc..4fde1fe 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -1778,9 +1778,9 @@ CODE # undefined. In any case we turn it into an anon array: # May check $Config{libs} too, thus not empty. - $self->{LIBS} = !defined $self->{LIBS} ? [''] : - !ref $self->{LIBS} ? [$self->{LIBS}] : - $self->{LIBS} ; + $self->{LIBS} = [$self->{LIBS}] unless ref $self->{LIBS}; + + $self->{LIBS} = [''] unless @{$self->{LIBS}} && defined $self->{LIBS}[0]; foreach my $libs ( @{$self->{LIBS}} ){ $libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace