I've some XS code that creates a self-tied AV thusly:

        av = newAV();
        ...
        rv = newRV_noinc((SV *)av);
        sv_bless(rv, gv_stashpv("MyPackage", TRUE));
        sv_magic((SV *)av, Nullsv, 'P', Nullch, 0);
        RETVAL = rv;

I basically copied the logic from pp_tie.  However, when the FETCH
method (written in perl) is called, it goes into a recursive frenzy
repeatedly calling itself on the AV.  This kind of makes sense - after
all because it is a self-tie the tied from and tied to AVs are one and
the same.  However this recursion doesn't happen if you do a self-tie
purely in perl, so I must be missing a necessary step somewhere.  Can
someone give me a clue?

Thanks,

Alan Burlison

Reply via email to