hello,

I have been struggling for two days to get a perl-module which I wrote
under modperl-1 and apache-1.3.24. I am forced to switch to httpd-20 and
modperl-2, since a particular configuration (with SSL and <Directory>)
doesn't work with apache-1.3, but it will with httpd-2.0 Porting the
module to modperl-2.0 isn't so eays, since the book "Writing Apache
Modules with Perl and C" from Stei & MacEachern only covers modperl-1.0
Therefore, I decided to use the compat-mode of modperl. Unfortunately,
it seems that this doesn't work at all.

a simple example:

--- test3.pm ---

package test3;

use strict;

use Apache2;
use Apache::compat;

BEGIN {
        print("test3.pm::BEGIN\n");
        Apache::log_error("test3.pm::BEGIN");
}

1;

--- end ---
this will result in:
---
Undefined subroutine &Apache::log_error called at /root/Portal/test3.pm line 17
---
I fixed that by "aliasing" Apache::log_error to Apache->server->log_error, by
adding "sub Apache::log_error" to <...where-perl-lives>/Apache2/Apache/compat.pm.

However, more complex code will still fail.

e.g., when I "use Apache::Table();", I will get:
---
Can't locate object method "boot" via package "mod_perl::boot" at
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Apache/Table.pm line 6.
Compilation failed in require at /root/Portal/Apache/PortalAuth.pm line 17.
---
The code ("PortalAuth.pm") *did* work flawlessy with modperl-1.0, but it does
not with the compat-mode of modperl-2.0. I am stuck here, and our project
is stuck too. This is a point where I cannot proceed :-(


best regards,
herbert rosmanith


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to