On Tue, 6 Feb 2001, Vivek Khera wrote:
> However, at the end of the template processing, the object is not
> destroyed; that is, the DESTROY() method is never called, and
> therefore the tied hash never gets untied and  Apache::Session::MySQL
> doesn't get a chance to write the data back to the store.

Hmmm... If I'm reading the code correctly, what's supposed to happen is
that the stash (where your plugin instance lives) gets localized when you
call $tt->process() and de-localized at the end, which should result in
anything you added to it (with your USE s = session) getting DESTROY-ed.  
Maybe there's a bug in this process somewhere?  Are you keeping a copy of
the stash anywhere else?  Are you doing something in your plugin's load()
method that involves a reference to the session object?  That could cause
this kind of problem.  Maybe you could post a bit more of your plugin
code.

To make sure your stash is getting cleared, try putting some other object
into it (by passing it to process) and see if it gets destroyed.  If it
does, then there's something about the way your plugin is written that's
causing the problem.  If not, TT has a problem.

- Perrin

Reply via email to