4
use File::Basename qw(&basename &dirname);
6
# List explicitly here the variables you want Configure to
7
# generate. Metaconfig only looks for shell variables, so you
8
# have to mention them as if they were shell variables, not
9
# %Config entries. Thus you write
11
# to ensure Configure will look for $Config{startperl}.
13
# This forces PL files to create target in same directory as PL file.
14
# This is so that make depend always knows where to find PL derivatives.
16
($file = basename($0)) =~ s/\.PL$//;
18
if ($Config{'osname'} eq 'VMS' or
19
$Config{'osname'} eq 'OS2'); # "case-forgiving"
20
open OUT,">$file" or die "Can't create $file: $!";
22
print "Extracting $file (with variable substitutions)\n";
25
# In this section, perl variables will be expanded during extraction.
26
# You can use $Config{...} to use Configure variables.
28
print OUT "# automatically built from ".basename($0)."\n";
29
print OUT "# don't modify, all changes will be lost !!!!\n";
30
print OUT <<'!NO!SUBS!';
31
package PDL::Doc::Config;
36
\$PDL::Doc::pager = \'$Config{'pager'}\';
37
\$PDL::Doc::pager = \$ENV{PAGER} if defined \$ENV{PAGER};
38
\$PDL::Doc::DefaultFile = \'$Config{'man1direxp'}\';