summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-08-07 14:46:05 +0200
committerNicholas Clark <nick@ccl4.org>2013-08-07 14:46:05 +0200
commit6966712632e5ebeda818e8f9c53c3553a75c2772 (patch)
tree0e9933fbbf5059297fb3388ecca539cbaf86ed58 /configpm
parent0cc24529e390c3e3a36017d014646f710c1672fd (diff)
downloadperl-6966712632e5ebeda818e8f9c53c3553a75c2772.tar.gz
Report the perl executable path in the error if Config.pm is out of sync.
If the version that Config.pm was built for differs from the version of the perl executable running it, Config.pm aborts with an error message. The error message was updated to include $0 (the script filename) in Aug 2010 by commit b982c5de5a0d9f6f. Somewhat misleadingly the commit message says "include the path of the perl executable in the error message." which $0 is not. This commit adds $^X to the error message - the path of the perl executable. The error message also shows the script name, as this might also be useful in diagnosing the cause of the problem.
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm5
1 files changed, 2 insertions, 3 deletions
diff --git a/configpm b/configpm
index efba74d9a0..db6d7ae070 100755
--- a/configpm
+++ b/configpm
@@ -280,12 +280,11 @@ sub import {
return;
}
-die "Perl lib version (%s) doesn't match executable '$0' version ($])"
+die "$0: Perl lib version (%s) doesn't match executable '$^X' version ($])"
unless $^V;
$^V eq %s
- or die "Perl lib version (%s) doesn't match executable '$0' version (" .
- sprintf("v%%vd",$^V) . ")";
+ or die sprintf "%%s: Perl lib version (%s) doesn't match executable '$^X' version (%%vd)", $0, $^V;
ENDOFBEG