diff options
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/podlators/Makefile.PL | 12 | ||||
-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 |
3 files changed, 83 insertions, 12 deletions
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; |