in reply to How to untie oneself?

The only way I know of is using symbolic references. Perl crashes if you pass tie a reference to the variable that you are tieing.

See PLP::Tie::Delay.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Replies are listed 'Best First'.
Re: Re: How to untie oneself?
by tilly (Archbishop) on Jul 10, 2003 at 21:21 UTC
    Can you offer a snippet demonstrating this crash?

    If this is true, then the approach that I offered above can still be made to work - just have promise() take the return of tying the variable and then stuff the ref to the original into that.

      Strange. I thought I replied yesterday.

      I thought perl -e'sub TIESCALAR { } tie $foo, main, \$foo' would crash, but it doesn't with both 5.6.1 and 5.8.0. I'm sure it (or something similar) did crash in earlier versions, because I recall having discussed it on Magnet #perl, where several wizards said is was a known problem.

      Or I had a very bad nightmare. If that is the case, I wonder how PLP::Tie::Delay escaped dreamworld :)

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

        See the last line of 273168.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller