[let's split this from the VOTE thread and have a dedicated thread]

Philippe M. Chiasson wrote:
> Stas Bekman wrote:
>
>>Philippe M. Chiasson wrote:
>>
>>
>>>Stas Bekman wrote:
>>>
>>>
>>>>Philippe M. Chiasson wrote:
>>>>
>>>>
>>>>>[...]
>>>
>>>The problem I see is the lookup. How do you find all modperl_mgv * for
>>>"Some::NameSpace"? AFAIK, they are located in modperl_handler_t's and
>>>these
>>>are buried deep into configuration structures, no ?
>>>
>>>I can't think of an easy way to implement a lookup like this, short of
>>>having
>>>a global knoledge of all modperl_(handle|mgv)_t created.
>>
>>even if we had it it'd be a very slow operation to find those out.
>
>
> Yes indeed it would be.
>
>
>>>Am I missing something obvious ?
>>
>>I don't think so. Though I'd check why it does work when doing it in
>>perl (the original way). After all that original implementation doesn't
>>have a problem with mgvs. May be because the reloaded code gets the same
>>addresses and in your implementation it is not?
>
>
> That's because the Perl implementation deleted every single stash _entry_
> one by one (CODE, SV, AV, HV, etc) directly, and left the stash itself
> alone. This works, but it's slow and causes the annying warnings. The XS
> implementation, by wiping entire stashes goes much quicker and avoids these
> warnings (and a few other goodies).

so there is no way to wipe the hash, but not "wipe" it?

>>May be there should be a mechanism that will not use mgv's in which case
>>the xs code should be used. if the mgvs are in use the perl code is the
>>way to go. since those who need this feature don't care about the
>>performance this should work.
>
>
> Yup, I am thinking:
>
> ModPerl::Util::unload_package_xs()
> ModPerl::Util::unload_package_pp()
>
> and
> ModPerl::Util::unload_package() as the user-visible, recommended one
> that just dispatches to _pp for now, until the xs implementation can
> be fixed (if it can)

go for it.

should probably document the availability of the _xs for the brave ones. After all it does work in some cases :0)

--
__________________________________________________________________
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]



Reply via email to