This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Weed buglets pointed out by
[perl5.git] / configpm
index 8c53dbb..c64af8a 100755 (executable)
--- 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;
@@ -38,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.