develooper Front page | perl.perl5.porters | Postings from October 2000

Re: Did change 1307 (GSAR) break self ties?

Thread Previous | Thread Next
Nick Ing-Simmons
October 2, 2000 10:26
Re: Did change 1307 (GSAR) break self ties?
Message ID:
Nicholas Clark <> 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 


And there is MGf_GSKIP which is tested as well.

But the code for FETCH does: 

Perl_magic_getpack(pTHX_ SV *sv, MAGIC *mg)
    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 <>
Via, but not speaking for: Texas Instruments Ltd.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About