diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-10 22:20:02 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-10 22:20:02 +0000 |
commit | d74aef63aeb4d46f448310ac53a60d9d476f5db2 (patch) | |
tree | a18a379246b001cc4089e02a88f1223209b79044 /configpm | |
parent | 5c9043edeb70a81eaee4950b15c528c3f1f0536f (diff) | |
download | perl-d74aef63aeb4d46f448310ac53a60d9d476f5db2.tar.gz |
Add the deprecation warning for v-strings.
(A Tale Of Caution: Originally I tried to use
"no warnings 'deprecated'; in configpm, but that
lead into whole lotta pain. The warnings pragma
pulls in Carp, and then Carp somehow messes up Exporter,
and one ends up with several mysterious failures.
Just don't go there.)
p4raw-id: //depot/maint-5.8/perl@20126
Diffstat (limited to 'configpm')
-rwxr-xr-x | configpm | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -58,7 +58,11 @@ else { open CONFIG, ">$Config_PM" or die "Can't open $Config_PM: $!\n"; -my $myver = sprintf "v%vd", $^V; +my $myver; +open(CONFIG_SH, 'config.sh') || die "Can't open config.sh: $!"; +while(<CONFIG_SH>) { if (/^version='(.+)'$/) { $myver = $1; last } } +close(CONFIG_SH); +die "Can't find version in config.sh\n" unless defined $myver;; printf CONFIG <<'ENDOFBEG', ($myver) x 3; # This file was created by configpm when Perl was built. Any changes @@ -92,9 +96,9 @@ sub import { die "Perl lib version (%s) doesn't match executable version ($])" unless $^V; -$^V eq %s - or die "Perl lib version (%s) doesn't match executable version (" . - sprintf("v%%vd",$^V) . ")"; +my $exever = sprintf("%%vd",$^V); +$exever eq "%s" + or die "Perl lib version (%s) doesn't match executable version ($exever)"; ENDOFBEG |