Proxy Objects

Matts on 2002-08-08T11:01:49

Perl.com has published my article on Proxy Objects where I talk about how they can be used to build circular referencing data structures but still allow them to be garbage collected. Let me know if you find it interesting or crappy ;-)


Interesting

mir on 2002-08-08T12:17:57

I guess I'll have to vote for interesting, I learn a couple of things:

  • using Devel::Peek to get the refcount of variables,
  • that weaken is included in Scalar::Util, I always used it from WeakRef, is there a difference in the 2 versions BTW?

The final "let's wrap it all up in one nice package that works with all versions of Perl" is very cool too.

WeakRef vs Scalar::Util

jhi on 2002-08-08T12:35:27

As far as I know, no functional difference. WeakRef is by Tuomas Lukka and last updated in 1999, Scalar::Util by Graham Barr and updated more recently.

Re:WeakRef vs Scalar::Util

Matts on 2002-08-08T14:00:57

More importantly, Scalar::Util is included in 5.8

(how did you miss that one? ;-)

Re:WeakRef vs Scalar::Util

jhi on 2002-08-08T22:51:46

I didn't, I don't like repeating obvious trivialities :-)

I vote interesting

ct on 2002-08-08T14:49:09

Though I haven't got a clue what "true Blue Peter fashion" means.

Blue Peter

Matts on 2002-08-08T15:35:15

In the UK we have a kids educational TV magazine show called Blue Peter (no idea if it still runs or not, but it had been running for over 30 years when I was a kid). They would do both crafts and cooking, and half way through to save time they would magically pull out from under the table a finished version, saying: "And here's one we made earlier".

Hence my hand-waving, and the saying.