Gerald,

wrapping the endforeach up one line is not an option for me. The example I
gave is a simple one. Imagine many embperl constructs all on one line.

eg. production example (all one line):

[+ sprintf('%4d', $item->ctr) +] [+ ' ' x ($item->level * 2) +] <a
href="http://
dmoz.org/[+ $item->fullPathEsc +]">[+ $item->label +]</a> [<a
href="http://dmoz.
org/editors/editcat.cgi?cat=[+ $item->fullPathEsc +]">edit</A>] [$ if
$fdat{show
editors} && $item->editors $]  [- @editors = @{ $item->editors }; -]  [$
foreach
 $editor ( @editors ) $]<A
href="http://dmoz.org/editors/profile.cgi?editor=[+ $
editor +]"><font color="green">[+ $editor +]</font></A> [$ endforeach $]  [$
if
scalar @editors > 1 $]  <A
href="http://dmoz.org/editors/send.cgi?toeditor=[+ jo
in('+', @editors) +]"><B><font color="green">all</font></B></A>[$ endif $]
[$ endif $]

ilia.


----- Original Message -----
From: "Gerald Richter" <[EMAIL PROTECTED]>
To: "Ilia Lobsanov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 21, 2001 10:43
Subject: Re: optStripCR


>
>
> > Back to my suggestion, wouldn't this be more readable?
> >
> > [$ foreach $i ( 1..5 ) $]
> > [+ $i +] [$ nop $]
> > [$ endforeach $]
> >
>
> This [$ nop $] seems to highly magical to me. It depends on a certain way
> that Embperl uses to strip blank lines, which may change in the future
> (actualy I already have a patch here, which makes other cases more
> readable). I would either use the way Bill suggested or write
>
> [$ foreach $i ( 1..5 ) $]
> [+ $i +][$
> endforeach $]
>
> Gerald
>
>
> >
> > ----- Original Message -----
> > From: "Bill "Elvis" Gibbs" <[EMAIL PROTECTED]>
> > To: "Ilia Lobsanov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, July 20, 2001 16:53
> > Subject: RE: optStripCR
> >
> >
> > > <pre>
> > > [$ foreach $i ( 1..5 ) $]
> > > [+ $i +][$ endforeach $]
> > > </pre>
> > >
> > > works
> > >
> > > I've run into this before too...but always just moved my ending loop
> > > statement to where there's no break that's apparently being
> > > interpreted...that's the quick fix
> > >
> > >
> > > Bill "Elvis" Gibbs
> > > goEbusiness.com - putting e-motion in your business
> > > email - [EMAIL PROTECTED] work - 301-668-5090 cell - 301-748-6938
> > >
> > > -----Original Message-----
> > > From: Ilia Lobsanov [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, July 20, 2001 4:13 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: optStripCR
> > >
> > >
> > > Here's a demo of the problem I'm trying to describe:
> > > http://dmoz.nurey.net/cr.epl
> > >
> > > ilia.
> > >
> > > ----- Original Message -----
> > > From: "Gerald Richter" <[EMAIL PROTECTED]>
> > > To: "Ilia Lobsanov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Friday, July 20, 2001 2:11 AM
> > > Subject: Re: optStripCR
> > >
> > >
> > > > > I have an EPO file which needs to have no carriage returns in the
> > final
> > > > > output. I do want carriage returns in the source for readability.
> > > > > Unless I'm missing something, there's no easy way to do this in
> > Embperl.
> > > > > May I suggest another option, optStripCR? When activated, all
> carriage
> > > > > returns are stripped before going to the browser.
> > > > >
> > > > > [$ nop $] would be nice as well to strip newlines on a
case-by-case
> > > basis.
> > > > >
> > > >
> > > > You can use EMBPERL_INPUT_FUNC to retrieve the file on your own and
> > strip
> > > > CR's on the fly.
> > > >
> > > > Also in a <PRE> section I don't see why CR's should be a problem,
> > because
> > > it
> > > > don't affect browsers displays if line endings are CRLF or LF only
> > > >
> > > > 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 925131
> > > > WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> > > > -------------------------------------------------------------
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> -------------------------------------------------------------
> 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 925131
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to