From d42e1eb74e834d1cf3ac4b5c9bd3527c3d5da67b Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 28 Jan 2016 13:44:07 -0600 Subject: Integrate podlators 4.05. --- make_ext.pl | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'make_ext.pl') diff --git a/make_ext.pl b/make_ext.pl index 0745049556..659445808a 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -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, -- cgit v1.2.1