>> 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.
>
>ok, we can do the same (or similar) in compat.pm to support 
>Apache::log_error

thanks.

>> However, more complex code will still fail.
>> > e.g., when I "use Apache::Table();", I will get:
>
>Apache::Table does not exist in 2.0-tobe, it has been moved to APR::Table.
>APR::Table is included by Apache::compat, and i just made a change so
>'use Apache::Table ();' becomes a noop.

aha. I had changed that to "use Apache2::APR::Table();" and it worked.

>if you are using modperl-2.0 from cvs, we can work out these issues pretty 
>quick.  just keep posting any problems you have.

thanks a lot. there are some problems (I am neither a perl professional,
nor a mod_perl professional) which I cannot solve. but first, an easy
one:

1)
        return OK unless $r->is_main;

complains that "is_main" does not exist. I changed that to
"return OK unless !$r->main;", but still this is an compat-issue.


2)
        $r->lookup_uri;

seems to be mising. Apache complains:

[Mon Jun 03 10:42:51 2002] [error] [client 127.0.0.1] Can't locate object method 
"lookup_uri" via package "Apache::RequestRec" (perhaps you forgot to load 
"Apache::RequestRec"?) at /root/Portal/Apache/PortalAuth.pm line 487.

adding "use Apache::RequestRec;" doesnt help.

I tried to fix this error by using the Apache::Connection class, but
I got some "reference not blessed" error then.

the whole  (relevant) code looks like this:

##############################################################
## trans-handler start here
##############################################################

sub trans($$) {
        my ($self,$r)=@_;
[...]
        dump_subenv($r);
[...]
}


sub dump_subenv($) {
        my $r=shift;

        Apache::log_error("> SubEnvironment");

        my $subr=$r->lookup_uri($r->uri);
[...]
}


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

Reply via email to