perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Perl Handlers and namespaces.
Date Tue, 06 Nov 2001 04:53:58 GMT
Guillaume wrote:

> I ran into this problem today. I am trying to develope a small
> application server with a few handlers and Apache/1.3.22 .
> 
> So I have something that looks like this set up in the apache conf file:
> 
> <Location /somewhere>
>    <Limit GET POST HEAD>
>       Allow from all
>    </Limit>
>    PerlRequire "startup.pl"
>    SetHandler perl-script
>    PerlHandler AppServer
> 
>    AuthName "AppServer"
>    AuthType Basic
>    PerlAuthenHandler AppServer::Auth
>    require valid-user
> 
>    PerlAccessHandler AppServer::Access
> </Location>
> 
> Now, you notice that these packages are all under the same namespace.
> This, somehow, causes an 'Undefined subroutine &AppServer::handler
> called.' each time the server recieves a request from a client. However,
> if i move the main handler into another
> namespace or simply rename it to foo.pm ( and adjust the apache conf
> file of course ) the error magically disappears. If one of the access
> handler or authentification handler is under the same namespace as the
> main handler, i always get the undefined subroutine error msg.
> 
> I'm not sure why or how apache handles this or if it's a bug or if i'm
> just too tired and missed something somewhere else. I would appreciate
> someone's insight on this. Is it a bug / limitation /... ?
> 
> Thanks for your time,
> Guillaume
> 


It's a known kludge/bug:

http://perl.apache.org/guide/porting.html#More_package_name_related_issues



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message