Mailing List Archive

[* in EmbperlObject
Hi,
it seems that I cannot use [* *] in pages handled by
EmbperlObject. Since I can't find documentation for this I ask
here: Why is that so and how can I circumvent it for
constructions like the following without printing each line of
HTML with a perl print statement?

[*
do {
*]
<SomeHTML>
[* print "$rec->{name}"; *]
<SomeMoreHTML>
[*
} while ($rec = $sth->fetchrow_hashref);
*]

Andre
RE: [* in EmbperlObject [ In reply to ]
first of all, that should be
[+ $rec->{name} +]
or
[- print OUT $rec->{name} -]
do you still have a problem once that is changed?

> -----Original Message-----
> From: Andre Landwehr [mailto:andre.landwehr@gmx.net]
> Sent: Wednesday, August 09, 2000 11:41 AM
> To: Modperl List
> Subject: [.* in EmbperlObject
>
>
> Hi,
> it seems that I cannot use [* *] in pages handled by
> EmbperlObject. Since I can't find documentation for this I ask
> here: Why is that so and how can I circumvent it for
> constructions like the following without printing each line of
> HTML with a perl print statement?
>
> [*
> do {
> *]
> <SomeHTML>
> [* print "$rec->{name}"; *]
> <SomeMoreHTML>
> [*
> } while ($rec = $sth->fetchrow_hashref);
> *]
>
> Andre
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Re: [* in EmbperlObject [ In reply to ]
On Wed, Aug 09, 2000 at 11:48:20AM -0400, Jack Cushman wrote:
> first of all, that should be
> [+ $rec->{name} +]
> or
> [- print OUT $rec->{name} -]
> do you still have a problem once that is changed?

Before I did everyting with [* *] sections and an interaction
between a loop in [* *] and a print statement in [- -] or
respectively a [+ +] section is not possible yet.

Since OUT is redirected to STDOUT on my system I do not need to
specify the filehandle with print.


Andre
Re: [* in EmbperlObject [ In reply to ]
Hi,
> it seems that I cannot use [* *] in pages handled by
> EmbperlObject. Since I can't find documentation for this I ask
> here: Why is that so and how can I circumvent it for
> constructions like the following without printing each line of
> HTML with a perl print statement?
>
> [*
> do {
> *]
> <SomeHTML>
> [* print "$rec->{name}"; *]
> <SomeMoreHTML>
> [*
> } while ($rec = $sth->fetchrow_hashref);
> *]
>

[* *] blocks are still experimental in 1.3b4 and have known (and unknown)
problems. They will stay in this state also in the final release of 1.3,
because it's too much work to get them really working in the 1.x
architecture. 2.x will fully support [* *] (and 2.0a6 actually already does
it!)

So if it doesn't work use:

[$ do $]
<SomeHTML>
[+ $rec->{name} +]
<SomeMoreHTML>
[$ until !($rec = $sth->fetchrow_hashref) $]


Gerald


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


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------