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

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

Thread Previous
From:
Mark Mielke
Date:
October 2, 2000 10:48
Subject:
Re: Did change 1307 (GSAR) break self ties?
Message ID:
20001002125347.C8064@pcard12x.ca.nortel.com
On Mon, Oct 02, 2000 at 06:07:07PM +0100, "Alan Burlison" wrote:
> Nicholas Clark wrote:
> > > 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?]
> I was thinking of something like:
> 	disable_magic(sv)
> 	real_sv = sv_mortalcopy(sv);
> 	enable_magic(sv);
> This should still allow nested magic to work, but should stop the
> recursion.

Except it would break threading. :-)

> > 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?
> That seems like the only workable fix.  However, I have no idea where
> such a flag should go, and how to 'unwind' it when the tied access has
> finished.  Personally I'd be content just to see self-ties and tie loops
> made illegal.  However, at the moment the position WRT the supportedness
> of self-ties is unclear.

    if (magical && ! sv_exists_in_thread_specific_magical_stack)
        ...

mark

-- 
markm@nortelnetworks.com/mark@mielke.cc/markm@ncf.ca __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | SIR Tools          (7H12)
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | Nortel Networks
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About