You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by George Sanderson <ge...@xorgate.com> on 2000/08/10 05:06:57 UTC
httpd.conf directive PerlHandler Apache::Hello->handler errors
I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
which is running on Linux 2.2.14.
When the following is presented in the httpd.conf file:
#
PerlModule Apache::Hello
<Location /hello/world>
SetHandler perl-script
PerlHandler Apache::Hello->handler
</Location>
#
Results in the following error_log output:
[Sun Aug 6 21:48:02 2000] [error] Undefined subroutine
&Apache::Hello->handler::handler
called at PerlHandler subroutine `Apache::Hello->handler' line 1.
(Opps. . . sorry about testing on Sunday :-)
The following works fine:
#
<Location /hello/world>
SetHandler perl-script
PerlHandler Apache::Hello
</Location>
#
The proper interpretation is presented in the Eagle book
(Apache Modules - Lincoln Stein:) on page 191.
That is, use the method within the PerlModule if it exists, otherwise
search the
directory for the module.
Re: httpd.conf directive PerlHandler Apache::Hello->handler errors
Posted by George Sanderson <ge...@xorgate.com>.
Ah I C, said the Perl man!
Thank you for the clarification.
At 09:55 AM 8/10/00 -0500, you wrote:
>ged@www.jubileegroup.co.uk (G.W. Haywood) wrote:
>
>>Hi there,
>>
>>On Wed, 9 Aug 2000, George Sanderson wrote:
>>
>>> PerlModule Apache::Hello
>>> <Location /hello/world>
>>> SetHandler perl-script
>>> PerlHandler Apache::Hello->handler
>>> </Location>
>>> #
>>> Results in the following error_log output:
>>> [Sun Aug 6 21:48:02 2000] [error] Undefined subroutine
>>> &Apache::Hello->handler::handler
>>> called at PerlHandler subroutine `Apache::Hello->handler' line 1.
>>
>>Page 70, Eagle Book.
>>
>>You mean
>>
>>PerlHandler Apache::Hello::handler
>
>To clarify - some handlers can be called using object-oriented
>techniques, and some can't. The switch for this behavior is that the
>handler is prototyped with ($$). Apache::Hello isn't, so you can't call
>its handler as a method, only as a function.
>
>Eagle book, p. 190.
>
Re: httpd.conf directive PerlHandler Apache::Hello->handler errors
Posted by Ken Williams <ke...@forum.swarthmore.edu>.
ged@www.jubileegroup.co.uk (G.W. Haywood) wrote:
>Hi there,
>
>On Wed, 9 Aug 2000, George Sanderson wrote:
>
>> PerlModule Apache::Hello
>> <Location /hello/world>
>> SetHandler perl-script
>> PerlHandler Apache::Hello->handler
>> </Location>
>> #
>> Results in the following error_log output:
>> [Sun Aug 6 21:48:02 2000] [error] Undefined subroutine
>> &Apache::Hello->handler::handler
>> called at PerlHandler subroutine `Apache::Hello->handler' line 1.
>
>Page 70, Eagle Book.
>
>You mean
>
>PerlHandler Apache::Hello::handler
To clarify - some handlers can be called using object-oriented
techniques, and some can't. The switch for this behavior is that the
handler is prototyped with ($$). Apache::Hello isn't, so you can't call
its handler as a method, only as a function.
Eagle book, p. 190.
Re: httpd.conf directive PerlHandler Apache::Hello->handler errors
Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi there,
On Wed, 9 Aug 2000, George Sanderson wrote:
> PerlModule Apache::Hello
> <Location /hello/world>
> SetHandler perl-script
> PerlHandler Apache::Hello->handler
> </Location>
> #
> Results in the following error_log output:
> [Sun Aug 6 21:48:02 2000] [error] Undefined subroutine
> &Apache::Hello->handler::handler
> called at PerlHandler subroutine `Apache::Hello->handler' line 1.
Page 70, Eagle Book.
You mean
PerlHandler Apache::Hello::handler
but note the comments in the book about automatic loading if you
specify the handler name explicitly.
73,
Ged.