In <9511221825.AA02650@pluto>
On Wed, 22 Nov 95 18:25:18 GMT
Nick Ing-Simmons <Nick.Ing-Simmons@tiuk.ti.com> writes:
>
>My patch to gv.c (and hence 5.002) has :
>
> if (strEQ(origname,"SUPER")) {
> /* Degenerate case ->SUPER::method should really lookup in original stash */
> SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0));
> ^^^^^^^^^^^^^
> sv_catpvn(tmpstr, "::SUPER", 7);
> stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
> *nsplit = ch;
> DEBUG_o( deb("Treating %s as %s::%s\n",origname,HvNAME(stash),name) );
>
>I think 1st HvNAME(stash) should really be caller's package name,
>but I don't know how to get that from C (yet) ...
It is of course as in this patch relative to 5.002:
*** gv.1.c Wed Nov 22 18:27:24 1995
--- gv.c Wed Nov 22 18:28:14 1995
***************
*** 225,231 ****
*nsplit = '\0';
if (strEQ(origname,"SUPER")) {
/* Degenerate case ->SUPER::method should really lookup in original stash */
! SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0));
sv_catpvn(tmpstr, "::SUPER", 7);
stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
*nsplit = ch;
--- 225,231 ----
*nsplit = '\0';
if (strEQ(origname,"SUPER")) {
/* Degenerate case ->SUPER::method should really lookup in original stash */
! SV *tmpstr = sv_2mortal(newSVpv(HvNAME(curcop->cop_stash),0));
sv_catpvn(tmpstr, "::SUPER", 7);
stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
*nsplit = ch;
On Wed, 22 Nov 95 18:25:18 GMT
Nick Ing-Simmons <Nick.Ing-Simmons@tiuk.ti.com> writes:
>
>My patch to gv.c (and hence 5.002) has :
>
> if (strEQ(origname,"SUPER")) {
> /* Degenerate case ->SUPER::method should really lookup in original stash */
> SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0));
> ^^^^^^^^^^^^^
> sv_catpvn(tmpstr, "::SUPER", 7);
> stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
> *nsplit = ch;
> DEBUG_o( deb("Treating %s as %s::%s\n",origname,HvNAME(stash),name) );
>
>I think 1st HvNAME(stash) should really be caller's package name,
>but I don't know how to get that from C (yet) ...
It is of course as in this patch relative to 5.002:
*** gv.1.c Wed Nov 22 18:27:24 1995
--- gv.c Wed Nov 22 18:28:14 1995
***************
*** 225,231 ****
*nsplit = '\0';
if (strEQ(origname,"SUPER")) {
/* Degenerate case ->SUPER::method should really lookup in original stash */
! SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0));
sv_catpvn(tmpstr, "::SUPER", 7);
stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
*nsplit = ch;
--- 225,231 ----
*nsplit = '\0';
if (strEQ(origname,"SUPER")) {
/* Degenerate case ->SUPER::method should really lookup in original stash */
! SV *tmpstr = sv_2mortal(newSVpv(HvNAME(curcop->cop_stash),0));
sv_catpvn(tmpstr, "::SUPER", 7);
stash = gv_stashpv(SvPV(tmpstr,na),TRUE);
*nsplit = ch;