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}.
14 $file = basename($0, '.PL');
15 $file .= '.com' if $^O eq 'VMS';
17 chdir("pod") or die "Can't chdir to pod: $!";
18 open OUT,">$file" or die "Can't create $file: $!";
20 print "Extracting $file (with variable substitutions)\n";
22 # In this section, perl variables will be expanded during extraction.
23 # You can use $Config{...} to use Configure variables.
25 print OUT <<"!GROK!THIS!";
27 eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
28 if \$running_under_some_shell;
31 # In the following, perl variables are not expanded during extraction.
33 print OUT <<'!NO!SUBS!';
45 close OUT or die "Can't close $file: $!";
46 chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
47 exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';