>
> 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
>
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
> Oddly, that's not quite what is happening. The content isn't lost
> altogether, else the simple join() I include wouldn't work either.
>
> Moreover, even if I re-initialize the data passed into my printTemplate()
> routine, the second call is still using some of the old data.
>
ok, next try. B
On Thu, 9 Dec 1999, Gerald Richter wrote:
> If I had understand you right, the first call via execute to your template
> works and the second not, right?
>
> That's not a bug! Embperl cleans up all your global variables inside your
> page after every request. $vars in your template is such a glo
> > 'cleanup' => -1
> >
> > which will disable cleanup at all, add $CLEANUP{'vars'} = 0 inside your
> > template, which should disable the cleanup only for that variable.
>
> That will work for this trivial example, but we have 107 templates on our
> site, each with 10 to 100 variables, and chang
On Thu, 9 Dec 1999, Gerald Richter wrote:
> Rereading your first mail, seems to me that there is an additional problem
> with Embperl's cleanup. This has nothing todo with Safe namespaces. Embperl
> will per default tidyup your namespace and therefor execute something like
> $vars = undef at the
> > The problem is, that Embperl must know, that you want to run in a Safe
> > compartement. Just add
> >
> > 'options' => HTML::Embperl::optSafeNamespace
> >
> > to the Excute parameters and it should work.
>
> Right. That makes sense, and it is definitely a good idea to run it with
> that optio
On Thu, 9 Dec 1999, Gerald Richter wrote:
> The problem is, that Embperl must know, that you want to run in a Safe
> compartement. Just add
>
> 'options' => HTML::Embperl::optSafeNamespace
>
> to the Excute parameters and it should work.
Right. That makes sense, and it is definitely a good id
Hi,
>
> The problem occurs when I call HTML::Embperl::Execute with an
> "inputfile" parameter and a "package" parameter. The package consists of
> an instance of a Safe->root() that has data varglobbed in.
>
>[..]
> sub printTemplate
> {
>my ($filename, $dataRef) = @_;
>
>my $compartment