summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
commit8990e3071044a96302560bbdb5706f3e74cf1bef (patch)
tree6cf4a58108544204591f25bd2d4f1801d49334b4 /configpm
parented6116ce9b9d13712ea252ee248b0400653db7f9 (diff)
downloadperl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just like the last commit]
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm27
1 files changed, 27 insertions, 0 deletions
diff --git a/configpm b/configpm
new file mode 100755
index 0000000000..8900d86b5f
--- /dev/null
+++ b/configpm
@@ -0,0 +1,27 @@
+#!./perl
+
+@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", $]);
+print <<"ENDOFBEG";
+package Config;
+require Exporter;
+\@ISA = (Exporter);
+\@EXPORT = qw(%Config);
+
+\$] == $myver or die sprintf
+ "Perl lib version ($myver) doesn't match executable version (%.3f)\\n", \$];
+
+ENDOFBEG
+
+print $_;
+