X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=configpm;h=c64af8a13b97eebefa0b4d8c2a357f9055c224f0;hb=1a3327fb7deb3868ef5f43054de7364d8208e8e7;hp=66b51a43bf1c1ec1a46aac133f8cc7fab3778049;hpb=e3d0cac0c3bf9ec77cb3e2fc362639f009d309e4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/configpm b/configpm index 66b51a4..c64af8a 100755 --- a/configpm +++ b/configpm @@ -17,7 +17,7 @@ my $glossary = $ARGV[1] || 'Porting/Glossary'; open CONFIG, ">$config_pm" or die "Can't open $config_pm: $!\n"; -$myver = $]; +$myver = sprintf "v%vd", $^V; print CONFIG <<'ENDOFBEG_NOQ', <<"ENDOFBEG"; package Config; @@ -30,6 +30,7 @@ sub import { my $pkg = shift; @_ = @EXPORT unless @_; my @func = grep {$_ ne '%Config'} @_; + local $Exporter::ExportLevel = 1; Exporter::import('Config', @func) if @func; return if @func == @_; my $callpkg = caller(0); @@ -37,8 +38,12 @@ sub import { } ENDOFBEG_NOQ -\$] == $myver - or die "Perl lib version ($myver) doesn't match executable version (\$])"; +die "Perl lib version ($myver) doesn't match executable version (\$])" + unless \$^V; + +\$^V eq $myver + or die "Perl lib version ($myver) doesn't match executable version (" . + (sprintf "v%vd",\$^V) . ")"; # This file was created by configpm when Perl was built. Any changes # made to this file will be lost the next time perl is built.