Inheritance within Apache::Registry(NG)
I want to write a handler that will basically do a bunch of processing, create some information, and then run a script in the handled directory passing in the information, afterwords, doing some more work before finally returning. So, like: sub handler { my $r = shift; # bunches of processing $r = __PACKAGE__-new( $r ); # $r now is of our class, but inherits Apache.pm's methods my $rc = Apache::RegistryNG( $r, ... #other info ); # more processing return $rc; } However, whenever I pass $r, it invariably gets recreated as an Apache object or, if I fiddle around with Apache::PerlRun, it gets maybe recreated as an Apache::RegistryNG object, depending on how I make PerlRun inherit things. The point is, I /want/ Registry or RegistryNG to manage the compilation and management of my script code, but the $r I pass in I want to be an Apache object with several extended and overridden methods of my design. Is this feasible at all? The sorts of things that RegistryNG and PerlRun do to their request objects sort of destroys any sort of inheritance that you setup. Is it better off just to incorporate the compilation code into a new module, rather than using what's already there? * Philip Molter * DataFoundry.net * http://www.datafoundry.net/ * [EMAIL PROTECTED]
Re: Inheritance within Apache::Registry(NG)
[EMAIL PROTECTED] (Philip Molter) wrote: However, whenever I pass $r, it invariably gets recreated as an Apache object or, if I fiddle around with Apache::PerlRun, it gets maybe recreated as an Apache::RegistryNG object, depending on how I make PerlRun inherit things. The point is, I /want/ Registry or RegistryNG to manage the compilation and management of my script code, but the $r I pass in I want to be an Apache object with several extended and overridden methods of my design. Is this feasible at all? The sorts of things that RegistryNG and PerlRun do to their request objects sort of destroys any sort of inheritance that you setup. Is it better off just to incorporate the compilation code into a new module, rather than using what's already there? I've got the same gripe. I don't think RegistryNG should be a subclass of Apache, and I don't think it should have to make so many changes to the request object. I've submitted patches to RegistryNG to Doug, but he hasn't had time to look at them yet. My changed versions are at http://forum.swarthmore.edu/~ken/modules/Apache-Filter/lib/Apache/ if you're interested in seeing what I've done. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum