Actually, the use of last/next still causes a core dump (bus error) with
perl's structures as well. Uncommenting either of the two loop control lines
will cause the dump.
[- $i = 0; -]
[* while ($i < 10) { *]
[+ $i +]<br>
[* if ($i == 5) { *]
[# last; #]
[- $i++; -]
[# next; #]
[* } *]
[- $i++; -]
[* } *]
Regards,
Christian
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Christian Gilmore
> Sent: Friday, February 04, 2000 10:33 AM
> To: 'Gerald Richter'; 'ModPerl Mailing List (E-mail)'
> Subject: RE: Embperl: loop control bug
>
>
> Should embperl then be altered to handle loop control itself
> or should we just
> use [* *] embperl structures to allow us to use perl's
> control structures
> instead of embperl's? In either event, it should probably be
> documented as a
> shortcoming of using embperl's control structures.
>
> Regards,
> Christian
>
> > -----Original Message-----
> > From: Gerald Richter [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 03, 2000 11:27 PM
> > To: Christian Gilmore; ModPerl Mailing List (E-mail)
> > Subject: RE: Embperl: loop control bug
> >
> >
> > > Embperl (1.2.0) causes a core dump when I put in a loop control
> > > statement. For
> > > instance, in the following snippet of code, when the 'last' line
> > > is reached,
> > > the apache child dumps core.
> > >
> > > [- $i = 0 -]
> > > [$ while ($i < 10) $]
> > > [+ $i +]<br>
> > > [$ if ($i == 5) $]
> > > [- last -]
> > > [$ endif $]
> > > [- $i++ -]
> > > [$ endwhile $]
> > >
> > > The problem occurs regardless of what looping mechanism I use
> > > (foreach, while,
> > > etc). Can someone confirm that this problem also occurs on
> > their system,
> > > please?
> > >
> >
> > "while/endwhile" are Embperl control statements and "last" is a Perl
> > statement. This can't work at all, because Perl doesn't know
> > anything about
> > Embperl's while/endwhile. This is completly handled by
> Embperl itself.
> >
> > Gerald
> >
> >
> >
> >
> > -------------------------------------------------------------
> > Gerald Richter ecos electronic communication services gmbh
> > Internetconnect * Webserver/-design/-datenbanken * Consulting
> >
> > Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> > E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925151
> > WWW: http://www.ecos.de Fax: +49 6133 925152
> > -------------------------------------------------------------
> >
> >
>
>