Heya Stas, I like that alot, as you say heaps cleaner. For the time being thou can you see any problems with us using my patch internally? I have run a few more tests and it seems everything still works pretty good. And of course keeping an eye out for Apache::RegistryCooker.. or will it be ported under Apache::PerlRun?
Cheers On Tue, 2004-10-05 at 11:34, Stas Bekman wrote: > David Radunz wrote: > > Hi All, > > > > I have looked high and low to work out how to avoid the 'Constant > > subroutine redefined' warnings in the error log, followed by the > > 'Prototype missmatch:' error upon subsequent hits to the apache child > > process - but, I have not been able to find an easy solution. The > > warnings are caused by the 'flush_namespace' routine of Apache::PerlRun > > which attempts to reset/nullify everything - including constants. When a > > constant is redefined it causes a warning in the error_log, and when the > > constant gets reset upon the next run of the script the prototype doesnt > > match as its reset incorrectly. > > David, take a look at the ModPerl::PerlRun which now > http://cvs.apache.org/viewcvs.cgi/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm?r1=1.50&r2=1.51&diff_format=h > uses: > http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_unload_package_ > which Philippe has just added recently. (you will need the current mp2 cvs > to see it at works). It solves all these problems in a much cleaner way. > It's still too new to new to be sure that it doesn't have side-effects, > but once it's proved to be good by users, we can just port it back to mp1. > > If you want to look at the C code that does that, it's > modperl_package_unload in: > http://cvs.apache.org/viewcvs.cgi/modperl-2.0/src/modules/perl/modperl_util.c?view=markup -- David Radunz, Developer / Programmer Netspace Online Systems Pty Ltd Ground Floor, 293 Camberwell Road Camberwell, Victoria 3124 Ph: +613 9811 0087 Fx: +613 9811 0044 Mo: +614 0549 9719 Em: [EMAIL PROTECTED] This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the organisation. Finally, the recipient should check this email and any attachments for the presence of viruses. The organisation accepts no liability for any damage caused by any virus transmitted by this email. -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html