summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST6
-rwxr-xr-xPorting/Maintainers.pl17
-rwxr-xr-xPorting/cmpVERSION.pl1
-rw-r--r--cpan/podlators/.gitignore26
-rw-r--r--cpan/podlators/Makefile.PL42
-rw-r--r--cpan/podlators/lib/Pod/Man.pm22
-rw-r--r--cpan/podlators/lib/Pod/ParseLink.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text/Color.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text/Overstrike.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text/Termcap.pm2
-rw-r--r--cpan/podlators/scripts/pod2man.PL (renamed from cpan/podlators/bin/pod2man)61
-rw-r--r--cpan/podlators/scripts/pod2text.PL (renamed from cpan/podlators/bin/pod2text)60
-rw-r--r--cpan/podlators/t/general/filehandle.t3
-rw-r--r--cpan/podlators/t/lib/Test/Podlators.pm12
-rw-r--r--make_ext.pl45
-rw-r--r--t/porting/customized.dat3
-rw-r--r--t/porting/dual-life.t14
-rw-r--r--utils/Makefile.PL6
-rw-r--r--utils/pod2man.PL53
-rw-r--r--utils/pod2text.PL53
21 files changed, 228 insertions, 206 deletions
diff --git a/MANIFEST b/MANIFEST
index 678415cfe1..6ffe6d97d2 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1861,8 +1861,6 @@ cpan/Pod-Escapes/lib/Pod/Escapes.pm Pod::Escapes
cpan/Pod-Escapes/t/01_about_verbose.t test Pod::Escapes
cpan/Pod-Escapes/t/10_main.t test Pod::Escapes
cpan/Pod-Escapes/t/15_name2charnum.t test Pod::Escapes
-cpan/podlators/bin/pod2man Translator to turn pod into manpage
-cpan/podlators/bin/pod2text Translator to turn pod into text
cpan/podlators/lib/Pod/Man.pm Convert POD data to *roff
cpan/podlators/lib/Pod/ParseLink.pm Perl an L<> formatting code in POD text
cpan/podlators/lib/Pod/Text/Color.pm Convert POD data to color ASCII text
@@ -1870,6 +1868,8 @@ cpan/podlators/lib/Pod/Text/Overstrike.pm Convert POD data to formatted overstri
cpan/podlators/lib/Pod/Text.pm Pod-Parser - convert POD data to formatted ASCII text
cpan/podlators/lib/Pod/Text/Termcap.pm Convert POD data to ASCII text with format escapes
cpan/podlators/Makefile.PL podlators Makefile.PL
+cpan/podlators/scripts/pod2man.PL Translator to turn pod into manpage
+cpan/podlators/scripts/pod2text.PL Translator to turn pod into text
cpan/podlators/t/data/basic.cap podlators test podlators test
cpan/podlators/t/data/basic.clr podlators test
cpan/podlators/t/data/basic.man podlators test
@@ -5628,8 +5628,6 @@ utils/perlivp.PL installation verification procedure
utils/piconv.PL iconv(1), reinvented in perl
utils/pl2pm.PL A pl to pm translator
utils/pod2html.PL Translator to turn pod into HTML
-utils/pod2man.PL Convert POD data to formatted *roff input
-utils/pod2text.PL Convert POD data to formatted ASCII text
utils/prove.PL The prove harness utility
utils/ptardiff.PL The ptardiff utility
utils/ptargrep.PL The ptargrep utility
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 90615c8868..a755090ce5 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -968,26 +968,17 @@ use File::Glob qw(:case);
},
'podlators' => {
- 'DISTRIBUTION' => 'RRA/podlators-4.04.tar.gz',
+ 'DISTRIBUTION' => 'RRA/podlators-4.05.tar.gz',
'FILES' => q[cpan/podlators pod/perlpodstyle.pod],
- # The perl distribution has pod2man.PL and pod2text.PL, which are
- # run to create pod2man and pod2text, while the CPAN distribution
- # just has the post-generated pod2man and pod2text files.
- # The following entries attempt to codify that odd fact.
- 'CUSTOMIZED' => [
- qw( scripts/pod2man.PL
- scripts/pod2text.PL
- ),
- ],
'MAP' => {
'' => 'cpan/podlators/',
- 'scripts/pod2man' => 'cpan/podlators/scripts/pod2man.PL',
- 'scripts/pod2text' => 'cpan/podlators/scripts/pod2text.PL',
-
# this file lives outside the cpan/ directory
'pod/perlpodstyle.pod' => 'pod/perlpodstyle.pod',
},
+ 'CUSTOMIZED' => [
+ qw( Makefile.PL )
+ ],
},
'Safe' => {
diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl
index c4ad9d2666..a97f8c74da 100755
--- a/Porting/cmpVERSION.pl
+++ b/Porting/cmpVERSION.pl
@@ -88,6 +88,7 @@ my %skip;
'cpan/Math-BigInt/t/Math/BigInt/Scalar.pm', # just a test module
'cpan/Math-BigInt/t/Math/BigInt/Subclass.pm', # just a test module
'cpan/Math-BigRat/t/Math/BigRat/Test.pm', # just a test module
+ 'cpan/podlators/t/lib/Test/Podlators.pm', # just a test module
'dist/Attribute-Handlers/demo/MyClass.pm', # it's just demonstration code
'dist/Exporter/lib/Exporter/Heavy.pm',
'lib/Carp/Heavy.pm',
diff --git a/cpan/podlators/.gitignore b/cpan/podlators/.gitignore
index 3a7bb2eb06..146b3be431 100644
--- a/cpan/podlators/.gitignore
+++ b/cpan/podlators/.gitignore
@@ -1,10 +1,20 @@
-/.travis.yml
-/LICENSE
-/MANIFEST
-/MANIFEST.SKIP
+/Build
+/Build.bat
+/MANIFEST.bak
+/Makefile
+/Makefile.old
/META.json
/META.yml
-/NOTES
-/README
-/THANKS
-/TODO
+/MYMETA.json
+/MYMETA.yml
+/_build/
+/blib/
+/cover_db/
+/nytprof.out
+/nytprof/
+/pm_to_blib
+/podlators-*/
+/podlators-*.tar.gz
+/podlators-*.tar.gz.asc
+/scripts/pod2man
+/scripts/pod2text
diff --git a/cpan/podlators/Makefile.PL b/cpan/podlators/Makefile.PL
index 074a35b728..964756c5e1 100644
--- a/cpan/podlators/Makefile.PL
+++ b/cpan/podlators/Makefile.PL
@@ -22,10 +22,14 @@ use File::Spec;
#
# @scripts - List of script names
#
-# Returns: List of relative paths from top of distribution
+# Returns: (Array) List of relative paths from top of distribution
+# (Scalar) Space-separated relative paths from top of distribution
sub scripts {
my (@scripts) = @_;
- return map { File::Spec->catfile('bin', $_) } @scripts;
+ my $script_ext = $^O eq 'VMS' ? '.com' : '';
+ my @paths = map { $_ .= $script_ext unless $_ =~ m/\.PL$/i;
+ File::Spec->catfile('scripts', $_) } @scripts;
+ return wantarray ? @paths : join(q{ }, @paths);
}
# Generate an association between a source file and a destination man page for
@@ -57,18 +61,27 @@ my %metadata = (
DISTNAME => 'podlators',
ABSTRACT => 'Convert POD data to various other formats',
AUTHOR => 'Russ Allbery <rra@cpan.org>',
- LICENSE => 'perl',
+ LICENSE => 'perl_5',
EXE_FILES => [scripts('pod2text', 'pod2man')],
VERSION_FROM => 'lib/Pod/Man.pm',
MIN_PERL_VERSION => '5.006',
+ # Use *.PL files to generate the driver scripts so that we get the correct
+ # invocation of Perl on non-UNIX platforms.
+ PL_FILES => {
+ scripts('pod2man.PL', 'pod2man'), scripts('pod2text.PL', 'pod2text'),
+ },
+
# Override the files that generate section 1 man pages.
- # (done differently in blead)
- #MAN1PODS => {
- # man1pod('bin', 'pod2man'),
- # man1pod('bin', 'pod2text'),
- # man1pod('pod', 'perlpodstyle'),
- #},
+ MAN1PODS => {
+ man1pod('scripts', 'pod2man'),
+ man1pod('scripts', 'pod2text'),
+ man1pod('pod', 'perlpodstyle'),
+ },
+
+ # Clean some additional files.
+ clean => { FILES => File::Spec->catdir('t', 'tmp') },
+ realclean => { FILES => scalar(scripts('pod2text', 'pod2man')) },
# Dependencies on other modules.
PREREQ_PM => {
@@ -76,7 +89,8 @@ my %metadata = (
'Pod::Simple' => 3.06,
},
- # ExtUtils::MakeMaker doesn't pick up nested test directories by default.
+ # Older versions of ExtUtils::MakeMaker don't pick up nested test
+ # directories by default.
test => { TESTS => 't/*/*.t' },
# For older versions of Perl, we have to force installation into the Perl
@@ -88,8 +102,10 @@ my %metadata = (
META_ADD => {
'meta-spec' => { version => 2 },
resources => {
- bugtracker =>
- 'https://rt.cpan.org/Public/Dist/Display.html?Name=podlators',
+ bugtracker => {
+ mailto => 'bug-podlators@rt.cpan.org',
+ web => 'https://rt.cpan.org/Dist/Display.html?Name=podlators',
+ },
homepage => 'http://www.eyrie.org/~eagle/software/podlators/',
repository => {
url => 'git://github.com/rra/podlators.git',
@@ -113,6 +129,8 @@ for my $key (keys(%supported)) {
}
}
+delete $metadata{MAN1PODS} if $ENV{PERL_CORE};
+
# Generate the actual Makefile. Pick an arbitrary module to pull the version
# from, since they should all have the same version.
WriteMakefile(%metadata);
diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
index f3f4f81593..a4ffc6d40f 100644
--- a/cpan/podlators/lib/Pod/Man.pm
+++ b/cpan/podlators/lib/Pod/Man.pm
@@ -14,7 +14,7 @@
# Written by Russ Allbery <rra@cpan.org>
# Substantial contributions by Sean Burke <sburke@cpan.org>
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2012, 2013, 2014, 2015 Russ Allbery <rra@cpan.org>
+# 2010, 2012, 2013, 2014, 2015, 2016 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -32,13 +32,18 @@ use warnings;
use subs qw(makespace);
use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
-use Carp qw(croak);
-use Encode qw(encode);
+use Carp qw(carp croak);
use Pod::Simple ();
+# Conditionally import Encode and set $HAS_ENCODE if it is available.
+our $HAS_ENCODE;
+BEGIN {
+ $HAS_ENCODE = eval { require Encode };
+}
+
@ISA = qw(Pod::Simple);
-$VERSION = '4.04';
+$VERSION = '4.05';
# Set the debugging level. If someone has inserted a debug function into this
# class already, use that. Otherwise, use any Pod::Simple debug function
@@ -141,6 +146,13 @@ sub new {
}
delete $$self{errors};
+ # Degrade back to non-utf8 if Encode is not available.
+ if ($$self{utf8} and !$HAS_ENCODE) {
+ carp ('utf8 mode requested but Encode module not available,'
+ . ' falling back to non-utf8');
+ delete $$self{utf8};
+ }
+
# Initialize various other internal constants based on our arguments.
$self->init_fonts;
$self->init_quotes;
@@ -743,7 +755,7 @@ sub outindex {
sub output {
my ($self, @text) = @_;
if ($$self{ENCODE}) {
- print { $$self{output_fh} } encode ('UTF-8', join ('', @text));
+ print { $$self{output_fh} } Encode::encode ('UTF-8', join ('', @text));
} else {
print { $$self{output_fh} } @text;
}
diff --git a/cpan/podlators/lib/Pod/ParseLink.pm b/cpan/podlators/lib/Pod/ParseLink.pm
index 4c6843d443..9690dde8b5 100644
--- a/cpan/podlators/lib/Pod/ParseLink.pm
+++ b/cpan/podlators/lib/Pod/ParseLink.pm
@@ -31,7 +31,7 @@ use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(parselink);
-$VERSION = '4.04';
+$VERSION = '4.05';
##############################################################################
# Implementation
diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm
index b0f1afcbce..448b3f6f22 100644
--- a/cpan/podlators/lib/Pod/Text.pm
+++ b/cpan/podlators/lib/Pod/Text.pm
@@ -39,7 +39,7 @@ use Pod::Simple ();
# We have to export pod2text for backward compatibility.
@EXPORT = qw(pod2text);
-$VERSION = '4.04';
+$VERSION = '4.05';
##############################################################################
# Initialization
diff --git a/cpan/podlators/lib/Pod/Text/Color.pm b/cpan/podlators/lib/Pod/Text/Color.pm
index cb23aab2d5..fbaa95a3ba 100644
--- a/cpan/podlators/lib/Pod/Text/Color.pm
+++ b/cpan/podlators/lib/Pod/Text/Color.pm
@@ -27,7 +27,7 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-$VERSION = '4.04';
+$VERSION = '4.05';
##############################################################################
# Overrides
diff --git a/cpan/podlators/lib/Pod/Text/Overstrike.pm b/cpan/podlators/lib/Pod/Text/Overstrike.pm
index 240aa851f6..e9b819d36f 100644
--- a/cpan/podlators/lib/Pod/Text/Overstrike.pm
+++ b/cpan/podlators/lib/Pod/Text/Overstrike.pm
@@ -35,7 +35,7 @@ use Pod::Text ();
@ISA = qw(Pod::Text);
-$VERSION = '4.04';
+$VERSION = '4.05';
##############################################################################
# Overrides
diff --git a/cpan/podlators/lib/Pod/Text/Termcap.pm b/cpan/podlators/lib/Pod/Text/Termcap.pm
index 5a5e314241..9f413368e9 100644
--- a/cpan/podlators/lib/Pod/Text/Termcap.pm
+++ b/cpan/podlators/lib/Pod/Text/Termcap.pm
@@ -28,7 +28,7 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-$VERSION = '4.04';
+$VERSION = '4.05';
##############################################################################
# Overrides
diff --git a/cpan/podlators/bin/pod2man b/cpan/podlators/scripts/pod2man.PL
index 46de7a7c18..f40c126e56 100644
--- a/cpan/podlators/bin/pod2man
+++ b/cpan/podlators/scripts/pod2man.PL
@@ -1,9 +1,53 @@
#!/usr/bin/perl
+#
+# Special wrapper script to generate the actual pod2man script. This is
+# required for proper start-up code on non-UNIX platforms, and is used inside
+# Perl core.
+
+use 5.006;
+use strict;
+use warnings;
+
+use Config qw(%Config);
+use Cwd qw(cwd);
+use File::Basename qw(basename dirname);
+
+# List explicitly here the variables you want Configure to generate.
+# Metaconfig only looks for shell variables, so you have to mention them as if
+# they were shell variables, not %Config entries. Thus you write
+# $startperl
+# to ensure Configure will look for $Config{startperl}.
+
+# This forces PL files to create target in same directory as PL file.
+# This is so that make depend always knows where to find PL derivatives.
+chdir(dirname($0)) or die "Cannot change directories: $!\n";
+my $file = basename($0, '.PL');
+if ($^O eq 'VMS') {
+ $file .= '.com';
+}
+
+# Create the generated script.
+## no critic (InputOutput::RequireBriefOpen)
+## no critic (InputOutput::RequireCheckedSyscalls)
+open(my $out, '>', $file) or die "Cannot create $file: $!\n";
+print "Extracting $file (with variable substitutions)\n";
+## use critic
+
+# In this section, Perl variables will be expanded during extraction. You can
+# use $Config{...} to use Configure variables.
+print {$out} <<"PREAMBLE" or die "Cannot write to $file: $!\n";
+$Config{startperl}
+ eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
+ if \$running_under_some_shell;
+PREAMBLE
+
+# In the following, Perl variables are not expanded during extraction.
+print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n";
# pod2man -- Convert POD data to formatted *roff input.
#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015
-# Russ Allbery <rra@cpan.org>
+# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
+# 2016 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -80,7 +124,8 @@ __END__
=for stopwords
en em --stderr stderr --utf8 UTF-8 overdo markup MT-LEVEL Allbery Solaris
-URL troff troff-specific formatters uppercased Christiansen --nourls
+URL troff troff-specific formatters uppercased Christiansen --nourls UTC
+prepend
=head1 NAME
@@ -364,9 +409,17 @@ B<pod2man> by Larry Wall and Tom Christiansen.
=head1 COPYRIGHT AND LICENSE
Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014,
-2015 Russ Allbery <rra@cpan.org>.
+2015, 2016 Russ Allbery <rra@cpan.org>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
=cut
+SCRIPT_BODY
+
+# Finish the generation of the script.
+close($out) or die "Cannot close $file: $!\n";
+chmod(0755, $file) or die "Cannot reset permissions for $file: $!\n";
+if ($Config{'eunicefix'} ne q{:}) {
+ exec("$Config{'eunicefix'} $file");
+}
diff --git a/cpan/podlators/bin/pod2text b/cpan/podlators/scripts/pod2text.PL
index 838f75ec1d..f6c80715b9 100644
--- a/cpan/podlators/bin/pod2text
+++ b/cpan/podlators/scripts/pod2text.PL
@@ -1,9 +1,53 @@
#!/usr/bin/perl
+#
+# Special wrapper script to generate the actual pod2man script. This is
+# required for proper start-up code on non-UNIX platforms, and is used inside
+# Perl core.
+
+use 5.006;
+use strict;
+use warnings;
+
+use Config qw(%Config);
+use Cwd qw(cwd);
+use File::Basename qw(basename dirname);
+
+# List explicitly here the variables you want Configure to generate.
+# Metaconfig only looks for shell variables, so you have to mention them as if
+# they were shell variables, not %Config entries. Thus you write
+# $startperl
+# to ensure Configure will look for $Config{startperl}.
+
+# This forces PL files to create target in same directory as PL file.
+# This is so that make depend always knows where to find PL derivatives.
+chdir(dirname($0)) or die "Cannot change directories: $!\n";
+my $file = basename($0, '.PL');
+if ($^O eq 'VMS') {
+ $file .= '.com';
+}
+
+# Create the generated script.
+## no critic (InputOutput::RequireBriefOpen)
+## no critic (InputOutput::RequireCheckedSyscalls)
+open(my $out, '>', $file) or die "Cannot create $file: $!\n";
+print "Extracting $file (with variable substitutions)\n";
+## use critic
+
+# In this section, Perl variables will be expanded during extraction. You can
+# use $Config{...} to use Configure variables.
+print {$out} <<"PREAMBLE" or die "Cannot write to $file: $!\n";
+$Config{startperl}
+ eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
+ if \$running_under_some_shell;
+PREAMBLE
+
+# In the following, Perl variables are not expanded during extraction.
+print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n";
# pod2text -- Convert POD data to formatted ASCII text.
#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015
-# Russ Allbery <rra@cpan.org>
+# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
+# 2016 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -313,10 +357,18 @@ Russ Allbery <rra@cpan.org>.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015
-Russ Allbery <rra@cpan.org>
+Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
+2016 Russ Allbery <rra@cpan.org>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
=cut
+SCRIPT_BODY
+
+# Finish the generation of the script.
+close($out) or die "Cannot close $file: $!\n";
+chmod(0755, $file) or die "Cannot reset permissions for $file: $!\n";
+if ($Config{'eunicefix'} ne ':') {
+ exec("$Config{'eunicefix'} $file");
+}
diff --git a/cpan/podlators/t/general/filehandle.t b/cpan/podlators/t/general/filehandle.t
index f726db23fe..cd6a229c24 100644
--- a/cpan/podlators/t/general/filehandle.t
+++ b/cpan/podlators/t/general/filehandle.t
@@ -6,7 +6,7 @@
# Pod::Man and Pod::Text had to implement it directly. Test to be sure it's
# working properly.
#
-# Copyright 2006, 2009, 2012, 2014, 2015 Russ Allbery <rra@cpan.org>
+# Copyright 2006, 2009, 2012, 2014, 2015, 2016 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -79,4 +79,3 @@ is($got, $text_data_ref->{output}, 'Pod::Text output');
# Clean up temporary files.
unlink($infile, $outfile);
-rmdir($tmpdir);
diff --git a/cpan/podlators/t/lib/Test/Podlators.pm b/cpan/podlators/t/lib/Test/Podlators.pm
index 33bbb652a6..3111d40be6 100644
--- a/cpan/podlators/t/lib/Test/Podlators.pm
+++ b/cpan/podlators/t/lib/Test/Podlators.pm
@@ -4,7 +4,7 @@
# suite. It provides some supporting functions to make it easier to write
# tests.
#
-# Copyright 2015 Russ Allbery <rra@cpan.org>
+# Copyright 2015, 2016 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -43,16 +43,14 @@ my $OLD_STDERR;
# The file name used to capture standard error output.
my $SAVED_STDERR;
-# Internal function to clean up the standard error output file. The "1 while"
-# construct is for VMS, in case there are multiple versions of the file.
+# Internal function to clean up the standard error output file. Leave the
+# temporary directory in place, since otherwise we race with other test
+# scripts trying to create the temporary directory when running tests in
+# parallel.
sub _stderr_cleanup {
if ($SAVED_STDERR && -f $SAVED_STDERR) {
unlink($SAVED_STDERR);
}
- my $tmpdir = File::Spec->catdir('t', 'tmp');
- if (-d $tmpdir) {
- rmdir($tmpdir);
- }
return;
}
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,
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index d5b81e3fc2..c356bb766a 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -55,7 +55,6 @@ Win32API::File cpan/Win32API-File/t/file.t 124e64aa77e755235eb297644a87fac5388d3
Win32API::File cpan/Win32API-File/t/tie.t 712ea7edd0cc805ce1c0b8172c01b03dd19b583d
Win32API::File cpan/Win32API-File/typemap 24bff088babeadac0873e8df390d1666d9d9db4a
autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac
-podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6
-podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
+podlators cpan/podlators/Makefile.PL d99c9f93d4b26ec27400d41227b6bcd155f48ba0
version cpan/version/lib/version.pm d0923b895d57f1d669ae36fcf85c87b16db341d1
version vutil.c 668f17ca43e2527645674d29ba772b86330d5663
diff --git a/t/porting/dual-life.t b/t/porting/dual-life.t
index 27daf46858..d7d62d717d 100644
--- a/t/porting/dual-life.t
+++ b/t/porting/dual-life.t
@@ -5,6 +5,7 @@ use strict;
# This tests properties of dual-life modules:
#
# * Are all dual-life programs being generated in utils/?
+# ... or in the module-specific locations where they are built.
chdir 't';
require './test.pl';
@@ -36,33 +37,38 @@ $dist_dir_exe{lc "podchecker.PL"} = "../cpan/Pod-Checker/podchecker";
$dist_dir_exe{lc "pod2usage.PL"} = "../cpan/Pod-Usage/pod2usage";
foreach (qw (pod2man pod2text)) {
- $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/$_";
+ $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/scripts/$_";
+ # redundant but necessary given use of scripts/ for both
+ # built version and .PL.
+ $dist_dir_exe{lc $_} = "../cpan/podlators/scripts/$_";
};
$dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';
my @programs;
+my $ext = $^O eq 'VMS' ? '.com' : '';
+
find(
{ no_chdir => 1, wanted => sub {
my $name = $File::Find::name;
return if $name =~ /blib/;
return unless $name =~ m{/(?:bin|scripts?)/\S+\z} && $name !~ m{/t/};
+ $name =~ s/${ext}\z//;
push @programs, $name;
}},
qw( ../cpan ../dist ../ext ),
);
-my $ext = $^O eq 'VMS' ? '.com' : '';
for my $f ( @programs ) {
$f =~ s/\.\z// if $^O eq 'VMS';
next if $f =~ $not_installed;
my $bn = basename($f);
if(grep { /\A(?i:$bn)\z/ } keys %dist_dir_exe) {
- ok( -f "$dist_dir_exe{lc $bn}$ext", "$f$ext");
+ ok( -f "$dist_dir_exe{lc $bn}$ext", $f);
} else {
- ok( -f catfile('..', 'utils', "$bn$ext"), "$f$ext" );
+ ok( -f catfile('..', 'utils', "$bn$ext"), $f );
}
}
diff --git a/utils/Makefile.PL b/utils/Makefile.PL
index c1dea908d1..27c371f82a 100644
--- a/utils/Makefile.PL
+++ b/utils/Makefile.PL
@@ -35,9 +35,9 @@ print $fh <<'EOT';
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
-pl = c2ph.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL pod2man.PL pod2text.PL zipdetails.PL
-plextract = c2ph corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html pod2man pod2text zipdetails
-plextractexe = ./c2ph ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./pod2man ./pod2man ./zipdetails
+pl = c2ph.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL
+plextract = c2ph corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails
+plextractexe = ./c2ph ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails
all: $(plextract)
diff --git a/utils/pod2man.PL b/utils/pod2man.PL
deleted file mode 100644
index 69172f6cef..0000000000
--- a/utils/pod2man.PL
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-my $origdir = cwd;
-chdir dirname($0);
-my $file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-use File::Spec;
-
-my $script = File::Spec->catfile(
- File::Spec->catdir(
- File::Spec->updir, qw(cpan podlators bin),
- ),
- 'pod2man',
-);
-
-if (open(IN, $script)) {
- print OUT <IN>;
- close IN;
-} else {
- die "$0: cannot find '$script'\n";
-}
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
diff --git a/utils/pod2text.PL b/utils/pod2text.PL
deleted file mode 100644
index 7dba4acb47..0000000000
--- a/utils/pod2text.PL
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-my $origdir = cwd;
-chdir dirname($0);
-my $file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-use File::Spec;
-
-my $script = File::Spec->catfile(
- File::Spec->catdir(
- File::Spec->updir, qw(cpan podlators bin),
- ),
- 'pod2text',
-);
-
-if (open(IN, $script)) {
- print OUT <IN>;
- close IN;
-} else {
- die "$0: cannot find '$script'\n";
-}
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;