Mailing List Archive

Is there an easy way to convert old mod-perl files to Embperl?
We are adding a bunch of new features to our web site. All new work is being
done in embperl - all old work was done with mod-perl that had the html code
embedded in it. Every page is dynamic, generating results based on user
queries of our mysql database. The look and feel of the site also changes
depending on the value of the $USER variable.

The new code consists of a sandwich epl file that provides header and footer
info, a border epl file that creates the left border that is context
specific to the body content, and the body epl containing the user requested
info. This is all driven off a perl module that accepts user input and does
the required queries and sets up the variables for the epl code.

We are running late (of course). While we had intended to convert all old
scripts that generate the body to embperl, I wondered if there was a
temporary solution that would allow the old perl modules to incorporate the
header and border epl files - while still using its own embedded html coding
to print the body of the page. One snag...we need user information to be
passed from the content to header files, as the header design is specific to
the user who is viewing the page.

Any suggestions gratefully accepted.
RE: Is there an easy way to convert old mod-perl files to Embperl? [ In reply to ]
>
> We are adding a bunch of new features to our web site. All new
> work is being
> done in embperl - all old work was done with mod-perl that had
> the html code
> embedded in it. Every page is dynamic, generating results based on user
> queries of our mysql database. The look and feel of the site also changes
> depending on the value of the $USER variable.
>
> The new code consists of a sandwich epl file that provides header
> and footer
> info, a border epl file that creates the left border that is context
> specific to the body content, and the body epl containing the
> user requested
> info. This is all driven off a perl module that accepts user
> input and does
> the required queries and sets up the variables for the epl code.
>
> We are running late (of course). While we had intended to convert all old
> scripts that generate the body to embperl, I wondered if there was a
> temporary solution that would allow the old perl modules to
> incorporate the
> header and border epl files - while still using its own embedded
> html coding
> to print the body of the page. One snag...we need user information to be
> passed from the content to header files, as the header design is
> specific to
> the user who is viewing the page.
>
> Any suggestions gratefully accepted.
>

You can call your Embperl footer and header with Execute from your old
mod_perl scripts.
Also you can pass parameters to your Embperl pages or access the Apache
request record with $req_rec (i.e. $req_rec -> connection -> user)

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