named "isa". (That happens when importing "isa" from UNIVERSAL,
for example.) Fixes bug #24824.
p4raw-id: //depot/perl@29336
assert(SvROK(cv));
}
- /* Can do the optimisation if right (LVAUE) is not a typeglob,
+ /* Can do the optimisation if right (LVALUE) is not a typeglob,
left (RVALUE) is a reference to something, and we're in void
context. */
if (!got_coderef && gv_type != SVt_PVGV && GIMME_V == G_VOID) {
LEAVE;
}
+ if (strEQ(GvNAME(right),"isa")) {
+ GvCVGEN(right) = 0;
+ ++PL_sub_generation;
+ }
}
SvSetMagicSV(right, left);
SETs(right);
require "./test.pl";
}
-plan tests => 109;
+plan tests => 110;
$a = {};
bless $a, "Bob";
ok( Bar->DOES( 'Foo' ), '... even when inherited' );
ok( Baz->DOES( 'Baz' ), '... even without inheriting any other DOES()' );
ok( ! Baz->DOES( 'Foo' ), '... returning true or false appropriately' );
+
+package Pig;
+package Bodine;
+Bodine->isa('Pig');
+*isa = \&UNIVERSAL::isa;
+eval { isa({}, 'HASH') };
+::is($@, '', "*isa correctly found")