This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.0 alpha 9
[perl5.git] / configpm
CommitLineData
2304df62 1#!./miniperl
8990e307
LW
2
3@ARGV = "./config.sh";
4
8990e307
LW
5open STDOUT, ">lib/Config.pm"
6 or die "Can't open lib/Config.pm: $!\n";
7$myver = sprintf("%.3f", $]);
8print <<"ENDOFBEG";
9package Config;
10require Exporter;
11\@ISA = (Exporter);
12\@EXPORT = qw(%Config);
13
14\$] == $myver or die sprintf
15 "Perl lib version ($myver) doesn't match executable version (%.3f)\\n", \$];
16
17ENDOFBEG
18
85e6fe83
LW
19while (<>) {
20 s:^#!/bin/sh::;
21 s/'undef'/undef/; # So we can say "if $Config{'foo'}".
22 s/=true$/='true'/; # Catch CONFIG=true line from Configure.
23 s/^(\w+)=/\$Config{'$1'} = /;
24 s/$/;/ unless (/^#/ || /^$/);
25 print $_;
26}
27print "1;\n";
28exit 0;