/* ->SUPER::method should really be looked up in original stash */
SV * const tmpstr = sv_2mortal(Perl_newSVpvf(aTHX_
"%"HEKf"::SUPER",
- HEKfARG(HvNAME_HEK((HV*)CopSTASH(PL_curcop)))
+ HEKfARG(HvENAME_HEK((HV*)CopSTASH(PL_curcop)))
));
/* __PACKAGE__::SUPER stash should be autovivified */
stash = gv_get_super_pkg(SvPVX_const(tmpstr), SvCUR(tmpstr), SvUTF8(tmpstr));
DEBUG_o( Perl_deb(aTHX_ "Treating %s as %s::%s\n",
- origname, HvNAME_get(stash), name) );
+ origname, HvENAME_get(stash), name) );
}
else {
/* don't autovifify if ->NoSuchStash::method */
use strict;
no warnings 'once';
-plan(tests => 108);
+plan(tests => 109);
@A::ISA = 'B';
@B::ISA = 'C';
is eval { (main->SUPER::method)[0] }, 'main',
'Mentioning *SUPER:: does not stop ->SUPER from working in main';
}
+{
+ BEGIN {
+ *Mover:: = *Mover2::;
+ *Mover2:: = *foo;
+ }
+ package Mover;
+ no strict;
+ # Not our(@ISA), because the bug we are testing for interacts with an
+ # our() bug that cancels this bug out.
+ @ISA = 'door';
+ sub door::dohtem { 'dohtem' }
+ ::is eval { Mover->SUPER::dohtem; }, 'dohtem',
+ 'SUPER inside moved package';
+}
# failed method call or UNIVERSAL::can() should not autovivify packages
is( $::{"Foo::"} || "none", "none"); # sanity check 1