This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 08f800f85 / #128182
[perl5.git] / make_ext.pl
index 223f67e..64263bd 100644 (file)
@@ -352,35 +352,26 @@ sub build_extension {
 
            print "\nCreating Makefile.PL in $ext_dir for $mname\n" if $verbose;
            my ($fromname, $key, $value);
-           if ($mname eq 'podlators') {
-               # We need to special case this somewhere, and this is fewer
-               # lines of code than a core-only Makefile.PL, and no more
-               # complex
-               $fromname = 'VERSION';
-               $key = 'DISTNAME';
-               $value = 'podlators';
-               $mname = 'Pod';
-           } else {
-               $key = 'ABSTRACT_FROM';
-               # We need to cope well with various possible layouts
-               my @dirs = split /::/, $mname;
-               my $leaf = pop @dirs;
-               my $leafname = "$leaf.pm";
-               my $pathname = join '/', @dirs, $leafname;
-               my @locations = ($leafname, $pathname, "lib/$pathname");
-               foreach (@locations) {
-                   if (-f $_) {
-                       $fromname = $_;
-                       last;
-                   }
-               }
 
-               unless ($fromname) {
-                   die "For $mname tried @locations in $ext_dir but can't find source";
+           $key = 'ABSTRACT_FROM';
+           # We need to cope well with various possible layouts
+           my @dirs = split /::/, $mname;
+           my $leaf = pop @dirs;
+           my $leafname = "$leaf.pm";
+           my $pathname = join '/', @dirs, $leafname;
+           my @locations = ($leafname, $pathname, "lib/$pathname");
+           foreach (@locations) {
+               if (-f $_) {
+                   $fromname = $_;
+                   last;
                }
-               ($value = $fromname) =~ s/\.pm\z/.pod/;
-               $value = $fromname unless -e $value;
-           }
+       }
+
+       unless ($fromname) {
+           die "For $mname tried @locations in $ext_dir but can't find source";
+       }
+       ($value = $fromname) =~ s/\.pm\z/.pod/;
+       $value = $fromname unless -e $value;
 
             if ($mname eq 'Pod::Checker') {
                 # the abstract in the .pm file is unparseable by MM,
@@ -616,7 +607,7 @@ sub just_pm_to_blib {
     my ($first) = $mname =~ /^([^:]+)/;
 
     my $pm_to_blib = IS_VMS ? 'pm_to_blib.ts' : 'pm_to_blib';
-    my $silent = defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/;
+    my $silent = defined $ENV{MAKEFLAGS} && $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/;
 
     foreach my $leaf (<*>) {
         if (-d $leaf) {
@@ -661,7 +652,7 @@ sub just_pm_to_blib {
     die "Inconsistent module $mname has both lib/ and $first/"
         if $has_lib && $has_topdir;
 
-    print "\nRunning pm_to_blib for $ext_dir directly\n"
+    print "Running pm_to_blib for $ext_dir directly\n"
       unless $silent;
 
     my %pm;