Since you say you're under
mod_perl, you might try this:
- Build your object
- Store it into a pnote: $r->pnote("holder", $my_object);
- Weaken your original reference: use Scalar::Util qw(weaken); weaken($my_object);
Untested, but it might at least solve part of your problem.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.