From: Gurusamy Sarathy Date: Thu, 30 Dec 1999 21:32:36 +0000 (+0000) Subject: change#4705 breaks code that interpolates $], so leave string value X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5089c844b09b4bf70ddcc69a1b2c187381eabf0c;p=p5sagit%2Fp5-mst-13.2.git change#4705 breaks code that interpolates $], so leave string value of $] as it was for compatibility (and perhaps introduce $^V or similar for the utf8 representation, maybe?) p4raw-link: @4705 on //depot/utfperl: a7cb1f9979dd83ab32266dc555f72f0939829c3f p4raw-id: //depot/perl@4742 --- diff --git a/configpm b/configpm index f57ef0b..8c53dbb 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 = 0+$]; +$myver = $]; print CONFIG <<'ENDOFBEG_NOQ', <<"ENDOFBEG"; package Config; @@ -39,7 +39,7 @@ sub import { ENDOFBEG_NOQ \$] == $myver - or die "Perl lib version ($myver) doesn't match executable version (" . 0+\$] . ")"; + or die "Perl lib version ($myver) doesn't match executable version (\$])"; # 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. diff --git a/gv.c b/gv.c index e2c6349..30d8f1e 100644 --- a/gv.c +++ b/gv.c @@ -812,8 +812,11 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) case ']': if (len == 1) { SV *sv = GvSV(gv); - GvSV(gv) = SvREFCNT_inc(PL_patchlevel); - SvREFCNT_dec(sv); + (void)SvUPGRADE(sv, SVt_PVNV); + SvNVX(sv) = SvNVX(PL_patchlevel); + SvNOK_on(sv); + (void)SvPV_nolen(sv); + SvREADONLY_on(sv); } break; }