On Thu, 9 Dec 1999, Gerald Richter wrote:

> So the solution to your problem should be, to use a fixed package name for
> all calls to the _same_ page.

Brilliant!  This does address exactly the problem I raised, and makes
perfect sense.

I had to do one absolutely wacky thing, though.  Because I call Execute
from within templates (indirectly, actually, through our own Template
module that wraps Embperl), I needed to extend your idea a little.

Essentially, I needed to use a unique Safe namespace for each request, but
somehow have it carry over between the included Execute calls.  So, I
share the Safe compartment's root across calls to Execute.  But simply
doing that means that when the same file is included and executed by
different templates then the package names will mismatch and data won't be
shared across included files correctly.  I solved this by creating a
virtual filename that is unique on a per file *and* a per "root"
namespace, but is common across requests, to allow for caching.

Does this make any sense to anyone?  Probably not.  :)  I'll go away now,
but thanks everyone, especially Gerald, for the help!  

-DeWitt




Reply via email to