Simply put, I cannot use any method provided by Apache::ServerUtil. The
Apache2 module is loaded, @INC has all the necessary paths and mod_perl
1.0 is not even installed so there is no conflict.
The "Perl Rocks" examples from perl.apache.org run fine, but if I try to
access any of the ServerUtil methods, I get stuff like
[error] [client 192.168.1.31] Undefined subroutine
&Apache::Server::server_root_relative called
at/var/www/perl/MyApache/Rocks.pm line 21.
This is the handler script:
--- BEGIN script ---
package MyApache::Rocks;
use strict;
use warnings;
use Apache::Server;
use Apache::ServerUtil;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile => qw(OK);
sub handler {
my $r = shift;
$r->content_type('text/plain');
print "mod_perl 2.0 rocks!\n";
print ".\n";
map { print " - $_\n" } @INC;
print ".\n";
print Apache::Server::server_root_relative($r->pool, 'conf');
# ^^^ fails here, this line is verbatim from the docs ^^^
return Apache::OK;
}
1;
--- END script ---
I have now been looking at this for quite some time, reconfiguring the
server, re-installing packages and rebooting the machine without any
effect. @INC is:
- /var/www/perl
- /usr/lib/perl5/Apache2
- /etc/perl
- /usr/local/lib/perl/5.8.3
- /usr/local/share/perl/5.8.3
- /usr/lib/perl5
- /usr/share/perl5
- /usr/lib/perl/5.8
- /usr/share/perl/5.8
- /usr/local/lib/site_perl
- .
- /etc/apache2/
- /etc/apache2/lib/perl
Does anyone have a working minimal script using this method and could
tell me what to do to get it running?
--
Got Backup?
Jabber: Shadowdancer at jabber.fsinf.de
Attachment:
pgph0nou29rfe.pgp
Description: PGP signature