You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ken Williams <ke...@forum.swarthmore.edu> on 2000/08/24 17:38:25 UTC
Apache->request($r) broken?
Hi all,
It looks like setting Apache->request($r) doesn't work as documented. I
can't get it to install a subclass of Apache as the request object.
Here's some code in a handler:
_____________________________________________
warn "blessing $r into ", __PACKAGE__;
Apache->request($r = bless { _r => $r});
warn "\$r is $r";
warn "Apache->request is ", Apache->request;
_____________________________________________
And the result in the error logs:
_____________________________________________
blessing Apache=SCALAR(0x1401eaeb8) into Apache::Filter at ...
$r is Apache::Filter=HASH(0x140088028) at ...
Apache->request is Apache=SCALAR(0x1401fdab8) at ...
_____________________________________________
Notice that even after I call Apache->request($r), Apache->request still
returns an object blessed into the 'Apache' class, not the class of the
object I gave it.
This is with the latest mod_perl from CVS, and Apache 1.3.12.
------------------- -------------------
Ken Williams Last Bastion of Euclidity
ken@forum.swarthmore.edu The Math Forum