SPUG: OO Perl object backrefrence question
Peter Darley
pdarley at kinesis-cem.com
Thu Sep 19 15:02:29 CDT 2002
Friends,
I have taken a look at the weaken() function, and have a further question
about it.
I want to use it in my objects, but I would also like to store the objects
to a database via the Apache::Session mechanism and reuse them during a
session (so I don't have to do all the complex db queries required to build
the objects every time).
My question is this: Will an object that comes back from stored still have
references to it's parent weaken()ed? I took a look at how Dumper() deals
with it and it doesn't seem to weaken() the references that it gives back,
so I'm worried. I don't know how to tell how the reference comes back from
being stored (weak or not).
Thanks,
Peter Darley
-----Original Message-----
From: owner-spug-list at pm.org [mailto:owner-spug-list at pm.org]On Behalf Of
Parr, Ryan
Sent: Friday, September 06, 2002 8:24 AM
To: SPUG
Subject: RE: SPUG: OO Perl object backrefrence question
There's an article by Matt Sergeant on Perl.com right now that covers
exactly this.
http://www.perl.com/pub/a/2002/08/07/proxyobject.html
Basically it shows how to pass a parent object to a child without creating a
circular reference.
-- Ryan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list