diff options
Diffstat (limited to 'configpm')
-rwxr-xr-x | configpm | 27 |
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 $_; + |