Hello all,

I'm trying to set up my CGI::Application descendent with mod_perl.
I'm a newbie, so please bear with me.  I found a note in the mail
archive from Jesse where he suggests the following (quote from his
message):

--------------------------

> Speaking of mod_perl, I was wondering if there is a generic
> PerlHandler for bootstrapping a CGI::Application.

Not quite generic, but pretty simple:

  package My::CGIApp::Module;
  use base qw/CGI::Application/;
  use Apache::Constants ':response';

  sub handler ($$) {
    my ($pkg, $r) = @_;

    # Instantiate and run() your CGI::Application module
    my $self = $pkg->new();
    $self->run();

    return OK;
  }

  sub setup {
    # Etc....
  }


If you choose to do this, start thinking of your handler() as your
"instance
script".  I've done this in cases where I truly want the CGI-App to
handle
all requests in a particular directory hierarchy.

----------------------------

I'm a bit confused by the above...should the above snippet be part of
httpd.conf?  Should be part of a script that is in httpd.conf as a
PerlRequire line?  It looks like it is part of the CGI::Application
descendent, I've gathered that much...but I'm not sure how to connect
it to Apache/mod_perl.

Thanks for your help with the newbie question,
Andy Huhn
Get weather bulletins delivered to your email, pager, or fax for as
little as $2.00/month!
http://www.stormnow.com


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to