You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kaare Rasmussen <ka...@kakidata.dk> on 2003/01/03 14:02:13 UTC

as outer block (and recipes)

I know this may be a stupid posting, because I've touched the topic before. 
But I keep running into this problem and I think I remember that you 
(Gerald) told that you would fix the problem I reported (rows with <TH> 
cells). 

I've written some sub routines to handle data list and data entry tables. I 
need this construction a lot of the time: 

<table>
<tr>
 some <th> cells
</tr>
[$if something$]
<tr>
 <td> for @data1
</tr>
[$elsif some other thing$]
<tr>
 <td> for @data1
</tr>
<tr>
 <td> for @data2
</tr>
[$endif$]
<tr>
 some fixed rows at the end
</tr> 

So obviously I'd like the tags <tr></tr> to be the enclosing entity for 
which a recurring action shuld take place. At least as an option. 

Another options is of course to program it myself in Perl, but I like to use 
the power of the tools I work with, and automatic iteration is one of 
Embperls strength. 

(Maybe) on another note, I'd like to know more about how to use recipes. Or 
rather: For what. Obviuosly it's a very nice solution. But I can't figure 
out for which problem. Will I be better off using a recipe than the above 
mentioned subroutine components? 

Right now I find data in my epl files and then I pass it on together with a 
hash containing information about how to display and process the fields to a 
subroutine. Getting back from this subroutine I call the update routines. 

Will recipes be a better way and if so, why? If not, where can I put recipes 
to good use? 

 --
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Email:kar@kakidata.dk

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


Re: as outer block (and recipes)

Posted by Gerald Richter <ri...@ecos.de>.

> I know this may be a stupid posting, because I've touched the topic
before.
> But I keep running into this problem and I think I remember that you
> (Gerald) told that you would fix the problem I reported (rows with <TH>
> cells).
>

I have put some work into it and found out that it is much more complicated
than I have expected, but I still plan to implement it. Hopefully it will be
in 2.0b9, but I can't promise...

>
> (Maybe) on another note, I'd like to know more about how to use recipes.
Or
> rather: For what. Obviuosly it's a very nice solution. But I can't figure
> out for which problem. Will I be better off using a recipe than the above
> mentioned subroutine components?
>
> Right now I find data in my epl files and then I pass it on together with
a
> hash containing information about how to display and process the fields to
a
> subroutine. Getting back from this subroutine I call the update routines.
>
> Will recipes be a better way and if so, why? If not, where can I put
recipes
> to good use?
>

Receipes are basicly good for doing a kind of filtering or transformation of
the source. The most obvious example is doing XSLT transformation. For
example you can use a POD files as input (maybe with Perl init), Embperl
transforms it to XML and then you run an XSLT transformation to get HML. The
idea is, that you can run other transformation, for example to get PDF (that
not implemented right now, but I am working on it).

I am currently updating the website, on thing that is already online is my
talk of the ApacheCon, which gives you some ideas of receipes and how the
Embperl website uses them, take a look at
http://www.ecos.de/embperl/pod/intro/IntroEmbperl2.htm

Gerald


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