NAME

Apache::ePerl - Parse embedded perl code from HTML files on the fly

SYNOPSIS

# add this to srm.conf
PerlModule Apache::ePerl

#in access.conf
<Directory /WWW/htdocs/eperl>
SetHandler perl-script
PerlHandler Apache::ePerl::handler
...
</Directory>

DESCRIPTION

Documents in the /WWW/htdocs/eperl directory will be parsed by the Apache::ePerl handler, which will evaluate any embedded perl which has been coded in the document before sending the response to the client.

Example:

<html> <head> <title>demo-01: CGI variable usage</title> </head> <body> <h1>demo-01: CGI variable usage</h1>

Welcome user from <? print $ENV{'REMOTE_HOST'}; "; !>, nice to mee t you!

</body> </html>

Would return the following response to the client system:

<html> <head> <title>demo-01: CGI variable usage</title> </head> <body> <h1>demo-01: CGI variable usage</h1>

Welcome user from 199.3.224.254, nice to meet you!

<UL></UL>

</body> </html>

NOTES

This implementation of ePerl differs from the implementation by Ralf Engelschall in a few ways. First, the ePerl interpreter will run as an Apache module in this case, and should be faster than the external binary, since no fork()ing is necessary. Secondly, all errors generated by ePerl code will be placed in the server's error log, rather than sent to the browser.

Also note, that all comments about this implementation should be directed to Mark Imbriaco <mark@itribe.net> and note Ralf Engelschall.

SEE ALSO

perl(1), Apache(3), http://www.engelschall.com/sw/eperl/

AUTHORS

Mark Imbriaco <mark@itribe.net> ePerl Concept by Ralf Engelschall <rse@engelschall.com> mod-perl by Doug MacEachern <dougm@osf.org>