Change 27284 by nicholas@nicholas-saigo on 2006/02/23 14:49:22 Integrate: [ 27002] Code assumes that *FOO{SCALAR} will always return a scalar reference, so make it so, creating $FOO if necessary. (Effectively this is a policy decision that PERL_DONT_CREATE_GVSV is visible to XS code, but isn't visible to Perl code) Affected files ... ... //depot/maint-5.8/perl/pp.c#86 integrate ... //depot/maint-5.8/perl/t/op/gv.t#4 integrate Differences ... ==== //depot/maint-5.8/perl/pp.c#86 (text) ==== Index: perl/pp.c --- perl/pp.c#85~26738~ 2006-01-08 13:30:11.000000000 -0800 +++ perl/pp.c 2006-02-23 06:49:22.000000000 -0800 @@ -604,7 +604,7 @@ break; case 'S': if (strEQ(second_letter, "CALAR")) - tmpRef = GvSV(gv); + tmpRef = GvSVn(gv); break; } } ==== //depot/maint-5.8/perl/t/op/gv.t#4 (xtext) ==== Index: perl/t/op/gv.t --- perl/t/op/gv.t#3~25505~ 2005-09-19 15:20:52.000000000 -0700 +++ perl/t/op/gv.t 2006-02-23 06:49:22.000000000 -0800 @@ -12,7 +12,7 @@ use warnings; require './test.pl'; -plan( tests => 61 ); +plan( tests => 63 ); # type coersion on assignment $foo = 'foo'; @@ -218,6 +218,19 @@ is ($x, "Rules\n"); } + +{ + no warnings qw(once uninitialized); + my $g = \*clatter; + my $r = eval {no strict; ${*{$g}{SCALAR}}}; + is ($@, '', "PERL_DONT_CREATE_GVSV shouldn't affect thingy syntax"); + + $g = \*vowm; + $r = eval {use strict; ${*{$g}{SCALAR}}}; + is ($@, '', + "PERL_DONT_CREATE_GVSV shouldn't affect thingy syntax under strict"); +} + __END__ Perl Rules End of Patch.