Write PerlPostReadRequestHandler

marco <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,
I tried to write an handler to be execute in the PostReadRequest phase 
of the http request cycle.
here's the simple code (it is only a test):

#file:touch.pl
   #-------------
   use strict;
   use warnings;

   use Apache::ServerUtil ();
   use Apache::RequestIO ();

   my $r = shift;
   $r->content_type('text/plain');

   $r->print("<html><body>ciao mondo</body></html>");

I add to the end of httpd.conf file this:

Alias /perl/ /home/marcolino/perlScript/
<Location /perl/ >
      SetHandler perl-script
      PerlResponseHandler touch.pl
      Allow from all
</Location>
PerlPostReadRequestHandler touch.pl

But I'm a little confused on what I wrote. I followed the ufficial guide 
but it was not very clear.
When I link to http://localhost:81/ it gives me an INTERNAL ERROR.
The error_log file contains:

Warning: Use of "require" without parentheses is ambiguous at (eval 3) 
line 1.
[Thu May 19 10:00:08 2011] [error] [client 127.0.0.1] failed to resolve 
handler `touch.pl': Can't locate touchpl in @INC (@INC contains: 
/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 
/usr/local/lib/site_perl . /usr/local/apache) at (eval 3) line 1.\n
.......(and more error of the same type).......

Had some solve this problem or had someone write a 
PerlPostReadRequestHandler?

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.