perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Gunton <n...@nilspace.com>
Subject Re: Nested <DL> Bug in 2.0b9
Date Sat, 05 Jul 2003 12:19:43 GMT
Gerald Richter wrote:
> 
> Hi Neil,
> 
> I didn't managed to fix the bug so far. The best thing is to use [+ +]
> instead of print OUT, because handling of print OUT is much more complicated
> inside Embperl.

Hi Gerald,

Unfortunately it's not really possible to replace 'print OUT' with [+ +]
in my code, because there are subroutines here which are recursive in
nature and so cannot be done using [$ sub $] (at least in 1.3), but
rather have to be normal Perl subs... and so they have to use 'print
OUT'. For new code it wouldn't be a problem to simply return a string
which is then output using [+ +] instead of doing 'print OUT', but for
the large codebase I am working with I think I'd rather wait for the
bugfix! Meanwhile, I'll try and continue testing other stuff.

Thanks again,

-Neil

p.s. Looking again at my explanation of the bug, I realize that I may
have been somewhat imprecise: When I say that it works when I remove the
inner nested <DL>, I meant the following:

[- $count = 0 -]
<DL>
  [$ while $count < 10 $]
    <DD>[- print OUT $count; -]
    [- $count++ -]
  [$ endwhile $]
</DL>

In other words, I don't mean removing the 'print OUT' makes things work,
but rather that simply removing the nested <DL> aspect of it makes it
work. Hope this helps...




> ----- Original Message -----
> From: "Neil Gunton" <neil@nilspace.com>
> To: "embperl" <embperl@perl.apache.org>
> Sent: Wednesday, July 02, 2003 8:21 PM
> Subject: Nested <DL> Bug in 2.0b9
> 
> > Hi Gerald, still testing 2.0b9 on my crazyguyonabike codebase - good
> > news, a few pages now seem to work, so progress being made! However, one
> > of my pages caused my machine to lock up completely - turned out that
> > the Apache process was taking up 100% of CPU and eventually exhausted
> > all virtual memory too. Not good! It took a little while, but I think
> > I've narrowed down what causes this to happen. The following code seems
> > to be a minimal case for making the bug manifest:
> >
> > [- $count = 0 -]
> > <DL>
> >      [$ while $count < 10 $]
> >         <DL>
> > <DD>[- print OUT $count; -]
> > </DL>
> > [- $count++ -]
> >      [$ endwhile $]
> > </DL>
> >
> > The key things here are that if I take out the inner nested <DL> then it
> > works ok. And if I take out the [$ while $] loop it also works ok...
> > when I have the nested <DL> inside the [$ while $] loop it loops
> > forever. The 'print OUT' also seems to be necessary for the bug to show
> > itself - if I replace it with [+ $count +] then the code works ok.
> >
> > This is running under Embperl::Object on RedHat 7.3, Apache/1.3.27,
> > mod_perl/1.27.
> >
> > Hope this helps,
> >
> > -Neil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message