summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1994-05-04 23:00:00 +0000
committerLarry Wall <lwall@netlabs.com>1994-05-04 23:00:00 +0000
commit85e6fe838fb25b257a1b363debf8691c0992ef71 (patch)
treefd5340cd6c3bbabfc21d3b0cac48e7ab3a481ebf /configpm
parent2304df62caa7d9be70e8b8bcdb454e139c9c103d (diff)
downloadperl-85e6fe838fb25b257a1b363debf8691c0992ef71.tar.gz
perl 5.0 alpha 9perl-5a9
[editor's note: the sparc executables have not been included, and emacs backup files have been removed]
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm19
1 files changed, 10 insertions, 9 deletions
diff --git a/configpm b/configpm
index 31585c4398..95fa9491af 100755
--- a/configpm
+++ b/configpm
@@ -2,13 +2,6 @@
@ARGV = "./config.sh";
-undef $/;
-$_ = <>;
-s:^#!/bin/sh\n::;
-s/'undef'/undef/g;
-s/\n(\w+)=/;\n\$Config{'$1'} = /g;
-s/;\n\$Config/\n\$Config/;
-
open STDOUT, ">lib/Config.pm"
or die "Can't open lib/Config.pm: $!\n";
$myver = sprintf("%.3f", $]);
@@ -23,5 +16,13 @@ require Exporter;
ENDOFBEG
-print $_;
-
+while (<>) {
+ s:^#!/bin/sh::;
+ s/'undef'/undef/; # So we can say "if $Config{'foo'}".
+ s/=true$/='true'/; # Catch CONFIG=true line from Configure.
+ s/^(\w+)=/\$Config{'$1'} = /;
+ s/$/;/ unless (/^#/ || /^$/);
+ print $_;
+}
+print "1;\n";
+exit 0;