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 <marcodis...@gmail.com<mailto:marcodis...@gmail.com>>
Date: Wed, 18 May 2011 14:43:57 -0500
To: Mod_perl users <modperl@perl.apache.org<mailto:modperl@perl.apache.org>>
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

Reply via email to