From: H.Merijn Brand Date: Wed, 20 May 2009 14:45:36 +0000 (+0200) Subject: fix glob-assign for FORMAT X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef595a33cf693d23c7caebc0a4299b55da3269cb;p=p5sagit%2Fp5-mst-13.2.git fix glob-assign for FORMAT --- diff --git a/sv.c b/sv.c index aab9fa0..b408485 100644 --- a/sv.c +++ b/sv.c @@ -3692,6 +3692,7 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr) goto common; case SVt_PVFM: location = (SV **) &GvFORM(dstr); + goto common; default: location = &GvSV(dstr); import_flag = GVf_IMPORTED_SV; diff --git a/t/op/write.t b/t/op/write.t index 07b5f73..f13ac5f 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -61,7 +61,7 @@ for my $tref ( @NumTests ){ my $bas_tests = 20; # number of tests in section 3 -my $bug_tests = 4 + 3 * 3 * 5 * 2 * 3 + 2 + 1; +my $bug_tests = 4 + 3 * 3 * 5 * 2 * 3 + 2 + 1 + 1; # number of tests in section 4 my $hmb_tests = 35; @@ -607,6 +607,9 @@ $= = 10; select $oldfh; close STDOUT_DUP; +*CmT = *{$::{Comment}}{FORMAT}; +ok defined *{$::{CmT}}{FORMAT}, "glob assign"; + fresh_perl_like(<<'EOP', qr/^Format STDOUT redefined at/, {stderr => 1}, '#64562 - Segmentation fault with redefined formats and warnings'); #!./perl