Howdy all,

Trying to run a script from the Eagle Book (ch.4 Example 4-14)
Using the Apache API, so it looks like:

#!/usr/bin/perl -w
# file perl/hello3.pl

use strict:

my $r-> = Apache->request;
$r->content_type('text/html');
$r->send_http_header;
return OK unless $r->header_only;
.
.
.

And so on. Like a module.pm in other words.

It doesn't work. The 'perl/' dir is the one set up for other scripts.
The perl.conf for this dir is per book directions.

<Location /perl>
 SetHandler     perl-script
 PerlHandler    Apache::Registry
 PerlSendHeader On
 Options        +ExecCGI
</Location>


Using current versions of Apache and mod_perl on Intel.

What the error_log shows is that apparently Registry is trying
to wrap the script in a handler subroutine, as Stas's guide describes -
But there's also the bareword warning first.

hello3.pl:Bareword "OK" not allowed while "strict subs" in use at
/usr/local/apache/perl/hello3.pl line 9.
Undefined subroutine &Apache::ROOT::perl::hello3_2epl::handler called at
<path to .../Apache/Registry.pm> line 135

Just before the example in the book, there is a discussion about
checking the environment variable MOD_PERL  or GATEWAY_INTERFACE.
But not clear if this should be done somehow for this script.

Would appreciate any help on what I'm not understanding about this.
Thanks,
M. Dearman

Reply via email to