Hello Lelton,

I usually do it the same way as Ed suggested. Use a different file extension for Embperl pages and pure perl pages. Here's an exerpt from my apache.conf:


Options +ExecCGI
AddHandler cgi-script .pl
<FilesMatch ".*\.html$">
  SetHandler  perl-script
  PerlHandler HTML::EmbperlObject
</FilesMatch>

So .html files are handles by Embperl and .pl files are just plainly called. If performance would be important for this website I could have used the mod_perl registry for the .pl files.

The form (in your Embperl code) then looks like:

<form action="download.pl">
 <input name="whatever"/>
</form>

And my stub for download.pl:

#!/usr/bin/env perl
use CGI;
my $cgi=new CGI;
my $whatever=$cgi->param('whatever');
my $c=magic_function_to_generate_content_into_scalar($whatever);
print "Content-Type: image/png\n\n";
print $c;
exit 0;

--
---> Dirk Jagdmann ^ doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to