develooper Front page | perl.perl5.porters | Postings from August 2009

Re: mro::invalidate_*all_*method_caches

Thread Previous | Thread Next
From:
Brandon Black
Date:
August 11, 2009 11:20
Subject:
Re: mro::invalidate_*all_*method_caches
Message ID:
84621a60908111119y4a9122d9m12a5590185d5b9b8@mail.gmail.com
On Sun, Jul 26, 2009 at 11:04 AM, Nicholas Clark<nick@ccl4.org> wrote:
> On Fri, Jul 24, 2009 at 02:15:50PM +0200, demerphq wrote:
>
>> I remember that the MRO stuff improved cache spoiling that happens as
>> a consequence of code like this, and it sounds like this is related.
>> In older perls the *entire* method cache is invalidated, with MRO
>> running i believe it is more intelligent. The latter sounds routine
>> sounds like a fallback for some reason or another.
>
> I think that the point of mro::invalidate_all_method_caches() was to provide
> some combination of an escape route to work around bugs where the caching
> was wrong, and a way to brute force make things work if there are known gaps
> in where the cache invalidation is documented not to work. I don't know if
> there are any known gaps.
>

Yes, mro::invalidate_all_method_caches() was primarily added as a
"just in case" method on the assumption that somewhere down the line,
someone would find a hole in the smarter method cache invalidation and
need a brute force workaround.  So long as no such hole rears its ugly
head, it's largely useless and untestable.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About