Nicholas Clark <nick@ccl4.org> writes: >> >> Shouldn't tie magic be disabled when retrieving from the array >> 'underneath' a tie? Unless this is done, self-ties cannot ever work. > >That would stop A-tiedto-B-tiedto-C working, surely? >[But is A-tiedto-B-tiedto-C desirable?] As I said in earlier mail - there is code in mg.c i.e. mg_get which does save_magic(); ... restore_magic(); And there is MGf_GSKIP which is tested as well. But the code for FETCH does: int Perl_magic_getpack(pTHX_ SV *sv, MAGIC *mg) { magic_methpack(sv,mg,"FETCH"); if (mg->mg_ptr) mg->mg_flags |= MGf_GSKIP; return 0; } i.e. it sets the "skip" flag _after_ calling the method - which seems odd. > >Is there anywhere for pp_tie to flag an object as active, so if you come >back to it via a loop (A-tiedto-A or anything more complex) it doesn't >use the tie method for a second (third (fourth (...))) trip? > >Nicholas Clark -- Nick Ing-Simmons <nik@tiuk.ti.com> Via, but not speaking for: Texas Instruments Ltd.Thread Previous | Thread Next