Mailing List Archive

does EmbperlBlocks really ignore html
Does the EmbperlBlocks syntax really ignore everything outside
of embperl block?
I don't have a minimal test case yet, but it still seems
to be randomly rearranging content and disappearing my table
tags and whatnot.

-mda

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: does EmbperlBlocks really ignore html [ In reply to ]
Hi,

>
> Does the EmbperlBlocks syntax really ignore everything
> outside of embperl block?

Yes, 100% sure

Gerald


> I don't have a minimal test case yet, but it still seems to
> be randomly rearranging content and disappearing my table
> tags and whatnot.
>
> -mda
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>
> ** Virus checked by BB-5000 Mailfilter **
> !DSPAM:416,461207ac310984712610620!
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: does EmbperlBlocks really ignore html [ In reply to ]
I figured out my problem.
I was using [+ my_sub() +] instead of [- my_sub() -]
where my_sub was defined using [$ sub my_sub $] ... [$ endsub $]

It wasn't obvious to me (nor do i see it documented anywhere),
but calling such subs with [+ +] seems to wreak havoc.

-mda

On Tue, 3 Apr 2007 10:59:36 +0200, "Gerald Richter - ECOS GmbH" <richter@ecos.de> said:
> Hi,
>
> >
> > Does the EmbperlBlocks syntax really ignore everything
> > outside of embperl block?
>
> Yes, 100% sure
>
> Gerald
>
>
> > I don't have a minimal test case yet, but it still seems to
> > be randomly rearranging content and disappearing my table
> > tags and whatnot.
> >
> > -mda
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
> > ** Virus checked by BB-5000 Mailfilter **
> > !DSPAM:416,461207ac310984712610620!
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: RE: does EmbperlBlocks really ignore html [ In reply to ]
>
> I figured out my problem.
> I was using [+ my_sub() +] instead of [- my_sub() -] where
> my_sub was defined using [$ sub my_sub $] ... [$ endsub $]
>
> It wasn't obvious to me (nor do i see it documented
> anywhere), but calling such subs with [+ +] seems to wreak havoc.
>

Using [+ my_sub () +] will just, in addition to what the sub is already
outputing, output the return value of the sub, which might be in your
case some html.

Gerald



> -mda
>
> On Tue, 3 Apr 2007 10:59:36 +0200, "Gerald Richter - ECOS
> GmbH" <richter@ecos.de> said:
> > Hi,
> >
> > >
> > > Does the EmbperlBlocks syntax really ignore everything outside of
> > > embperl block?
> >
> > Yes, 100% sure
> >
> > Gerald
> >
> >
> > > I don't have a minimal test case yet, but it still seems to be
> > > randomly rearranging content and disappearing my table tags and
> > > whatnot.
> > >
> > > -mda
> > >
> > >
> --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> > >
> > > ** Virus checked by BB-5000 Mailfilter **
> > > !DSPAM:416,461207ac310984712610620!
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>
> ** Virus checked by BB-5000 Mailfilter **
> !DSPAM:416,4612c350326191030413537!
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: RE: does EmbperlBlocks really ignore html [ In reply to ]
On Thu, 5 Apr 2007 07:59:38 +0200, "Gerald Richter - ECOS GmbH" <richter@ecos.de> said:
> >
> > I figured out my problem.
> > I was using [+ my_sub() +] instead of [- my_sub() -] where
> > my_sub was defined using [$ sub my_sub $] ... [$ endsub $]
> >
> > It wasn't obvious to me (nor do i see it documented
> > anywhere), but calling such subs with [+ +] seems to wreak havoc.
> >
>
> Using [+ my_sub () +] will just, in addition to what the sub is already
> outputing, output the return value of the sub, which might be in your
> case some html.

So just to confirm my understanding:

if a sub uses only [- -] and returns an html value, then it can and
should be called with [+ +].
alternatively, the sub can use [+ +] internally and the caller can
use [- -] to call it.
just don't mix the two.

-mda


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: RE: RE: does EmbperlBlocks really ignore html [ In reply to ]
>
> So just to confirm my understanding:
>
> if a sub uses only [- -] and returns an html value, then it
> can and should be called with [+ +].
> alternatively, the sub can use [+ +] internally and the
> caller can use [- -] to call it.
> just don't mix the two.
>

Yes.

In addition, if you have no output inside the sub, then just use a
normal Perl sub. If you have output in the sub, you should use [$ sub
$]. The benefit of using [$ sub $] and [+ +] inside, is that you get
only the from perl outputed data escaped, while when outputing a large
block of html, you have to care by your own about proper escaping

Gerald



** Virus checked by BB-5000 Mailfilter **

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