At 2:05 AM -0800 12/3/02, Michael G Schwern wrote:

> > -    $self->{LIBS}=[''] unless $self->{LIBS};
>> +    $self->{LIBS}=['']
>> +      unless ref($self->{LIBS}) eq 'SCALAR' && $self->{LIBS}
> > +      || ref($self->{LIBS}) eq 'ARRAY' && @{$self->{LIBS}};

>Likely better written as:
>
>       $self->{LIBS} = [$self->{LIBS}] unless ref $self->{LIBS};
>       $self->{LIBS} = [''] unless @{$self->{LIBS}};
>
>by doing the normalization to an array ref first, all the logic is
>simplified because we now know we have an array ref.

Almost.  Here's what ended up working:

--- lib/ExtUtils/MM_Unix.pm;-0  Mon Dec  2 12:04:41 2002
+++ lib/ExtUtils/MM_Unix.pm     Tue Dec  3 17:38:01 2002
@@ -1763,10 +1763,11 @@
     # Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
     # undefined. In any case we turn it into an anon array:
 
+    $self->{LIBS}=[$self->{LIBS}] unless ref $self->{LIBS};
+
     # May check $Config{libs} too, thus not empty.
-    $self->{LIBS}=[''] unless $self->{LIBS};
+    $self->{LIBS}=[''] unless @{$self->{LIBS}} && defined ${$self->{LIBS}}[0];
 
-    $self->{LIBS}=[$self->{LIBS}] if ref \$self->{LIBS} eq 'SCALAR';
     $self->{LD_RUN_PATH} = "";
     my($libs);
     foreach $libs ( @{$self->{LIBS}} ){
[end of patch]

After that bleadperl builds successfully and all the MakeMaker tests pass. 

While I was chasing this I noticed and fixed some typos in Liblist::Kid:

--- lib/ExtUtils/Liblist/Kid.pm;-0      Sat Nov 30 16:40:42 2002
+++ lib/ExtUtils/Liblist/Kid.pm Sun Dec  1 15:02:50 2002
@@ -366,7 +366,7 @@
   my($self, $potential_libs,$verbose,$give_libs) = @_;
   my(@crtls,$crtlstr);
   my($dbgqual) = $self->{OPTIMIZE} || $Config{'optimize'} ||
-                 $self->{CCFLAS}   || $Config{'ccflags'};
+                 $self->{CCFLAGS}   || $Config{'ccflags'};
   @crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
               . 'PerlShr/Share' );
   push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
@@ -398,8 +398,8 @@
   my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
   my $cwd = cwd();
   my($so,$lib_ext,$obj_ext) = @Config{'so','lib_ext','obj_ext'};
-  # List of common Unix library names and there VMS equivalents
-  # (VMS equivalent of '' indicates that the library is automatially
+  # List of common Unix library names and their VMS equivalents
+  # (VMS equivalent of '' indicates that the library is automatically
   # searched by the linker, and should be skipped here.)
   my(@flibs, %libs_seen);
   my %libmap = ( 'm' => '', 'f77' => '', 'F77' => '', 'V77' => '', 'c' => '',
[end of patch]

These are against whatever's in bleadperl; if they don't apply to
your working copy, let me know and I'll reformulate against the
latest MM snapshot.


-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to