Re: ModPerl handler

"McCarrell, Jeff" <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <C9F97214.2EBA%[email protected]>
http://perl.apache.org/docs/2.0/user/intro/start_fast.html

There are a wealth of good (maybe even great) docs here that explain the request life cycle, configuration … pretty much everything you need to know.
Happy reading!

From: marco <[email protected]<mailto:[email protected]>>
Date: Wed, 18 May 2011 14:43:57 -0500
To: Mod_perl users <[email protected]<mailto:[email protected]>>
Subject: ModPerl handler

Hi,
I'm writing an handler to execute with mod_perl.
I want to associate an handler of type PerlPostConfigHandler.
I write this code (filename=StartupLog.pm):

#file:Apache/StartupLog.pm
  package Apache::StartupLog;

  use strict;
  use warnings;
  use Apache();

  use Apache::Constants qw(OK);

  sub funzione {

    my $r=shift;
    $r->content_type('text/html');
    my $remote_ip = $r->connection->remote_ip;
    $r->print("
        <html><head><title>mod_perl test</title></head>",
        "<body><h1>hello ", $remote_ip , "<h1>",
        "</body></html>");

         return OK;
  }
  1;

My questions are:
1. I don't know what is the code I must put in httpd.conf file.
2. Where must I put the file StartupLog.pm in the filesystem?

Can someone help me?

Thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.