Hello everyone,

I am writing my first mod_perl handler. I've looked at some of the docs
online and have come up with the config/code below. However, when I go
to visit the URL in Apache, I get a download prompt for type:
httpd/unix-directory.



OS Info:
----------------------------------------------------
CentOS release 4.6 (Final)
----------------------------------------------------



Package info:
----------------------------------------------------
perl-5.8.8-11
httpd-2.0.59-1.el4s1.10.el4.centos
mod_perl-2.0.3-1.el4s1.3
----------------------------------------------------



Apache config:
----------------------------------------------------
PerlRequire /etc/httpd/perl/startup.pl
<Location /admin>
    SetHandler modperl 
    PerlResponseHandler Myserver::Handler
</Location>
----------------------------------------------------



/etc/httpd/perl/startup.pl:
----------------------------------------------------
use lib qw(/home/Perl/);
1;
----------------------------------------------------



/home/perl/Myserver/Handler.pm
----------------------------------------------------
package Myserver::Handler;

#Setup some essentials
use strict;         #strict tolerance for code
use Carp;           #debugging
use diagnostics;    #more debugging
use warnings;       #more debugging

#Handler-related stuff
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);

sub handler {
    my $self        = shift;
    return Apache2::Const::OK;
}

1;

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


-- 
xyon <[EMAIL PROTECTED]>

Reply via email to