Boris Zentner wrote: [...]
so lookup_method internally finds two entries. none of them matches My::RequestRec. So it checks isa() and finds that the first entry matches. It should now return 'Apache::RequestIO', which AUTOLOAD loads and now when it calls goto, it calls that method.
Yes, that is exactly what happened here. But it is wrong. from your example:
Apache::RequestIO is returned. now eval { require 'Apache::RequestIO' } loads the class/package.
but the next line 'goto &$AUTOLOAD' calls My::RequestRec::print and produce the endless loop. Since we need to call Apache::RequestRec::print _not_ My::RequestRec::print.
I see. So we probably need to call:
shift->$AUTOLOAD
then? which this time will find print() on its own, since Apache::RequestIO is now loaded.
Not sure about the AUTOLOAD goto magick though. Ideas?
May be having method_lookup return the package name will allow us to call:
Apache::RequestRec::print(@_);
But if there is a way to call the object method via goto, that would be the simplest way.
__________________________________________________________________ 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]