perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject [PMX:####] Re: [VOTE] mp2.0.0 next week?
Date Thu, 12 May 2005 05:37:43 GMT
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).

> 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)



Mime
View raw message