Hi Stas,
Am Freitag, 13. Februar 2004 04:17 schrieb Stas Bekman:
Boris Zentner wrote:
[...]
2. EazyLife can not know about my methods, so the option is guess and load all classes with methods that may satisfy me or ignore me. I dislike both and Apache::Request forwards everything unknown to the environ object, but it seems it looks what the object can ( untested ) so nothing is forwarded until the class is loaded.
Well, may be your case is much more complicated than the average case, and EazyLife could benefit a majority of users. And someone like you will have to manually figure out which modules to load. Unless you have better idea.
Right, but using Apache::Request is not so uncommon.
May be A-R can be fixed to use a proper inheritance?
If the methods and functions are grouped in the classfiles then ModPerl::MethodLookup, EazyLife and a lot of hazzle including inherence work out of the box. Just to remark this a last time.
Yes, I remember that ;)
I change the handle part a little
# handle inheritance if ([EMAIL PROTECTED] && $_[0] && ref( $_[0] ) ) { my($hint, @super_classes) = ModPerl::MethodLookup::lookup_method($AUTOLOAD); for (@super_classes) { push @modules, $_ if $_[0]->isa($_); }
Ooops, of course it's $_[0] and not $AUTOLOAD that's the object ;) Thanks for the fix.
But even then, it will not work. print seems a good startingpoint. Again from my example:
lookup_method find some possible superclasses for SuperRequestRec.
Apache::Filter and Apache::RequestIO.
But the superclass for SuperRequestRec is Apache::RequestRec.
Ah, right. We are after the second argument (Apache::RequestRec), not the first one (Apache::RequestIO).
I'll get back to you with a proper implementation.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]