summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-19 00:28:43 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-19 00:30:56 +0100
commit2419ffa9696600b121e9973fbb0846bda5fc5833 (patch)
tree37f70208530a935d51ccaafebc74fdf34e95d714
parentfa977e0c2e83c0be54ba8b02691cc7cbd60d5e39 (diff)
downloadperl-2419ffa9696600b121e9973fbb0846bda5fc5833.tar.gz
Fix issues with the podlators update
Upstream removed the wrappers from the scripts pod2man and pod2text which will require some re-engineering. I've reinstated the wrappers until after v5.13.6 ships. Added perlpodstyle to pod.lst
-rw-r--r--MANIFEST5
-rw-r--r--cpan/podlators/Makefile.PL12
-rw-r--r--cpan/podlators/scripts/pod2man.PL (renamed from cpan/podlators/scripts/pod2man)42
-rw-r--r--cpan/podlators/scripts/pod2text.PL (renamed from cpan/podlators/scripts/pod2text)41
-rw-r--r--pod.lst1
-rw-r--r--t/porting/dual-life.t2
6 files changed, 87 insertions, 16 deletions
diff --git a/MANIFEST b/MANIFEST
index db0ba97f40..15298fa1c2 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1644,9 +1644,8 @@ cpan/podlators/lib/Pod/Text/Color.pm Convert POD data to color ASCII text
cpan/podlators/lib/Pod/Text/Overstrike.pm Convert POD data to formatted overstrike text
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 Convert POD data to *roff
-cpan/podlators/scripts/pod2man Precursor for translator to turn pod into manpage
-cpan/podlators/scripts/pod2text Precursor for translator to turn pod into text
+cpan/podlators/scripts/pod2man.PL Precursor for translator to turn pod into manpage
+cpan/podlators/scripts/pod2text.PL Precursor for translator to turn pod into text
cpan/podlators/t/basic.cap podlators test
cpan/podlators/t/basic.clr podlators test
cpan/podlators/t/basic.man podlators test
diff --git a/cpan/podlators/Makefile.PL b/cpan/podlators/Makefile.PL
deleted file mode 100644
index 7b8566d111..0000000000
--- a/cpan/podlators/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use strict;
-use ExtUtils::MakeMaker;
-
-WriteMakefile (
- NAME => 'Pod',
- DISTNAME => 'podlators',
- VERSION_FROM => 'VERSION', # finds $VERSION
- EXE_FILES => [ 'scripts/pod2man', 'scripts/pod2text' ],
- INSTALLDIRS => ( $] >= 5.006 ? 'perl' : 'site' ),
- AUTHOR => 'Russ Allbery (rra@stanford.edu)',
- ABSTRACT => 'Convert POD data to various other formats'
-);
diff --git a/cpan/podlators/scripts/pod2man b/cpan/podlators/scripts/pod2man.PL
index 0a0ec4a1a7..08bdde24c8 100644
--- a/cpan/podlators/scripts/pod2man
+++ b/cpan/podlators/scripts/pod2man.PL
@@ -1,5 +1,40 @@
#!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.
+$origdir = cwd;
+chdir dirname($0);
+$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!
+
+# In the following, perl variables are not expanded during extraction.
+
+print OUT <<'!NO!SUBS!';
+
# pod2man -- Convert POD data to formatted *roff input.
#
# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010
@@ -301,3 +336,10 @@ This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
=cut
+!NO!SUBS!
+#'# (cperl-mode)
+
+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/cpan/podlators/scripts/pod2text b/cpan/podlators/scripts/pod2text.PL
index 210d6bdeda..62be8a4b8e 100644
--- a/cpan/podlators/scripts/pod2text
+++ b/cpan/podlators/scripts/pod2text.PL
@@ -1,5 +1,40 @@
#!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.
+$origdir = cwd;
+chdir dirname($0);
+$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!
+
+# In the following, perl variables are not expanded during extraction.
+
+print OUT <<'!NO!SUBS!';
+
# pod2text -- Convert POD data to formatted ASCII text.
#
# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010
@@ -267,3 +302,9 @@ This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
=cut
+!NO!SUBS!
+
+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/pod.lst b/pod.lst
index 0665b974b5..19daccb60a 100644
--- a/pod.lst
+++ b/pod.lst
@@ -57,6 +57,7 @@ h Reference Manual
2 perlpacktut Perl pack() and unpack() tutorial
perlpod Perl plain old documentation
perlpodspec Perl plain old documentation format specification
+ perlpodstyle Perl POD style guide
perlrun Perl execution and options
perldiag Perl diagnostic messages
perllexwarn Perl warnings and their control
diff --git a/t/porting/dual-life.t b/t/porting/dual-life.t
index 09d3beeb9f..5d4c45eb12 100644
--- a/t/porting/dual-life.t
+++ b/t/porting/dual-life.t
@@ -29,7 +29,7 @@ foreach (qw (podchecker podselect pod2usage)) {
$dist_dir_exe{lc "$_.PL"} = "../cpan/Pod-Parser/$_";
};
foreach (qw (pod2man pod2text)) {
- $dist_dir_exe{$_} = "../cpan/podlators/$_";
+ $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/$_";
};
$dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';