On Sun, Mar 17, 2002 at 05:19:37PM -0500, Ade Olonoh wrote:
> >     httpd.conf:
> > 
> >       PerlModule Apache::Filter
> >       PerlModule Apache::FillInForm
> >       <FilesMatch "\.foo$">
> >         PerlSetVar Filter on
> >         PerlHandler Apache::RegistryFilter Apache::FillInForm
> >       </FilesMatch>
> > 
> >     And then somewhere in your application:
> > 
> >       use Apache::FillInForm;
> >       Apache::FillInForm->fill; # We have a form to fill out
> 
> 
> Excuse my ignorance, but I'm a bit confused.  From this example, would
> test.foo be an HTML file, or a Perl program?  

A perl program (e.g., a registry script, content handler,
templating system, etc.).

> If the former, in what what application would you call fill()?  
> 
> If the latter, is the Apache conf to tell Apache::Filter to fill in
> whatever form it finds in the Perl program's output?

The apache conf just places it in the chain.  Calling Apache::FillInForm->fill
(in the perl code) is what activates the filter for a particular request.
  
It's equivalent to how Apache::ASP works.  If you set $Response->{FormFill} = 1
in a template, Apache::ASP filters the output through HTML::FillInForm.  This is
the same idea except it's largely decoupled from the content generation system.

Maurice

Reply via email to