ModPerl handler

ModPerl handler

am 18.05.2011 21:43:57 von Marco

This is a multi-part message in MIME format.
--------------060206050801000802060902
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

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("
mod_perl test",
"

hello ", $remote_ip , "

",
"");

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


--------------060206050801000802060902
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit







link="#0000ee">
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):



#

  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






--------------060206050801000802060902--

Re: ModPerl handler

am 18.05.2011 21:56:42 von Jeff McCarrell

--_000_C9F972142EBAjmccarreakamaicom_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

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 re=
quest life cycle, configuration =85 pretty much everything you need to know=
..
Happy reading!

From: marco >
Date: Wed, 18 May 2011 14:43:57 -0500
To: Mod_perl users =
>
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=3DStartupLog.pm):

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

use strict;
use warnings;
use Apache();

use Apache::Constants qw(OK);

sub funzione {

my $r=3Dshift;
$r->content_type('text/html');
my $remote_ip =3D $r->connection->remote_ip;
$r->print("
mod_perl test",
"

hello ", $remote_ip , "

",
"");

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


--_000_C9F972142EBAjmccarreakamaicom_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


252"> -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14p=
x; font-family: Calibri, sans-serif; ">
rg/docs/2.0/user/intro/start_fast.html">http://perl.apache.o rg/docs/2.0/use=
r/intro/start_fast.html

There are a wealth of =
good (maybe even great) docs here that explain the request life cycle, conf=
iguration =85 pretty much everything you need to know.
Happy read=
ing!

nt-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOT=
TOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LE=
FT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: m=
edium none; PADDING-TOP: 3pt">From: > marco <marcodisano@gmail.com<=
/a>>
Date: Wed, 18 May 2011 =
14:43:57 -0500
To: Mod_perl use=
rs <
modperl@perl.apache.org a>>
Subject: ModPerl handler=



=20

=20
=20
a8b" link=3D"#0000ee">
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=3DStartupLog.pm nt>):



#
e:Apache/StartupLog.pm">file:Apache/StartupLog.pm

  package Apache::StartupLog;

 

  use strict;

  use warnings;

  use Apache();   

 

  use Apache::Constants qw(OK);

    

  sub funzione {

     

    my $r=3Dshift;

    $r->content_type('text/html');

    my $remote_ip =3D $r->connection->remote_ip; r>     $r->print("

        <html><head><title=
>mod_perl
test</title></head>",

        "<body><h1>hello=
", $remote_ip , "<h1>",

        "</body></html>&=
quot;);   

     

         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





--_000_C9F972142EBAjmccarreakamaicom_--