You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2002/03/14 10:36:02 UTC

Re: Recipe at top of the file (was: Designing embperl for WYSIWYG editors - hope in embperl 2?)

>
> This reminds me of something else I'd been meaning to ask.  Have you
> considered some type of meta-directive that could be placed at the
> top of a file and would specify the recipe with which it should be
> processed?  Currently the caller decides this, but this would allow
> you to make the decision on a per-file basis.
>

You can't do this, because Embperl has to know how to process the file,
before it could process the file and exctract the name of the recipe from
the file.

What you can do is, to make a (meta-)recipe that decides what recipe to use
for example by using the file extentions, or you can use the newly
indtroduced application object to do this. Look at eg/web/epwebapp.pl, this
is an application object, it's get_recipe method is called by Embperl for
every file it processes, eg/web/epwebapp.pl get_recipe now looks at the file
extention of the file on the filesystem and at the file extention of the
file that the user requested and chooses the correct recipe, syntax and
other parameters.

Gerald


-------------------------------------------------------------
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 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




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