/* ... ck_entersub ......................................................... */
-STATIC int indirect_is_indirect(const indirect_op_info_t *moi, const indirect_op_info_t *ooi) {
- if (moi->pos > ooi->pos)
- return 0;
-
- if (moi->pos == ooi->pos)
- return moi->len == ooi->len && !memcmp(moi->buf, ooi->buf, moi->len);
-
- return 1;
-}
-
STATIC OP *(*indirect_old_ck_entersub)(pTHX_ OP *) = 0;
STATIC OP *indirect_ck_entersub(pTHX_ OP *o) {
if (!ooi)
goto done;
- if (indirect_is_indirect(moi, ooi)) {
+ /* When positions are identical, the method and the object must have the
+ * same name. But it also means that it is an indirect call, as "foo->foo"
+ * results in different positions. */
+ if (moi->pos <= ooi->pos) {
SV *file;
dSP;