From: Ilya Zakharevich Date: Sat, 16 May 1998 17:45:22 +0000 (-0400) Subject: [win32] fix problematic change#965 from maintbranch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57ff9a15b1566945fcd54bfbac75501e3ca969c2;p=p5sagit%2Fp5-mst-13.2.git [win32] fix problematic change#965 from maintbranch Message-Id: <199805162145.RAA02552@monk.mps.ohio-state.edu> Subject: Re: Not OK (after all) : perl 5.00404 +MAINT_TRIAL_3 on sun4-solaris 2.5 p4raw-link: @965 on //depot/maint-5.004/perl: 8472ac73d6d802946d766b5459d2d9c334889a3f p4raw-id: //depot/win32/perl@1023 --- diff --git a/gv.c b/gv.c index 1ef3b01..6ee8d23 100644 --- a/gv.c +++ b/gv.c @@ -111,6 +111,7 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi) if (multi) GvMULTI_on(gv); if (doproto) { /* Replicate part of newSUB here. */ + SvIOK_off(gv); ENTER; start_subparse(0,0); /* Create CV in compcv. */ GvCV(gv) = compcv; diff --git a/op.c b/op.c index beaac6a..d08f2ff 100644 --- a/op.c +++ b/op.c @@ -3374,7 +3374,7 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block) else sv_setiv((SV*)gv, -1); SvREFCNT_dec(compcv); - compcv = NULL; + cv = compcv = NULL; sub_generation++; goto noblock; } diff --git a/t/comp/proto.t b/t/comp/proto.t index 2a4c9cc..6a59107 100755 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -16,7 +16,7 @@ BEGIN { use strict; -print "1..80\n"; +print "1..82\n"; my $i = 1; @@ -403,3 +403,13 @@ sub foo2 ($\%); eval q{ foo2 "s" }; print "not " unless $@ =~ /^Not enough/; print "ok ", $i++, "\n"; + +sub X::foo3; +*X::foo3 = sub {'ok'}; +print "# $@not " unless eval {X->foo3} eq 'ok'; +print "ok ", $i++, "\n"; + +sub X::foo4 ($); +*X::foo4 = sub ($) {'ok'}; +print "not " unless X->foo4 eq 'ok'; +print "ok ", $i++, "\n";