http://qs1969.pair.com?node_id=189815


in reply to Proxy Objects

I enjoyed the article and learned a few things. I was already familiar with Perl's GC, and the information there was clear and concise. Your explanation of the proxy design pattern was also nice coverage of the material.

Two things about the article really stood out. First, covering a very clear example of why you would want to create a circular reference. The standard $a = \$a while correct, doesn't explain the use a circular reference would have, and why to intentionally create one. Well done.

Second, and also greatly appreciated was the discussion of weaken. That 5.6 had introduced core support for handling circular refs was new to me, and the coverage of the feature there was clear, and a nice surprise. I haven't seen the 5.8.0 docs yet, but this material would all be very useful in perlreftut.

Cheers,
Erik

Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet

Replies are listed 'Best First'.
Re: Re: Proxy Objects
by Matts (Deacon) on Aug 13, 2002 at 15:49 UTC
    The other nice thing about 5.8.0 is that Scalar::Util is included (which for those wondering, is why I didn't use the CPAN WeakRef module), so you don't need to install any extra modules to get weaken().