RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread Gerald Richter
> > 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 >

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread DeWitt Clinton
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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread Gerald Richter
> 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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread DeWitt Clinton
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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread Gerald Richter
> > '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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread DeWitt Clinton
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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread Gerald Richter
> > 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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread DeWitt Clinton
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

RE: Potential bug in HTML::Embperl 1.2.0

1999-12-09 Thread Gerald Richter
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