in reply to Re: Re: Hiding Internal Classes ?
in thread Hiding Internal Classes ?

Yes, methods are cached. Changing @ISA causes the cache to be invalidated except (apparently) for non-inherited methods. undefing or redefining the subroutine rather than the whole package is correctly handled by the caching code. I'm not surprised that the caching code doesn't expect people to undef the whole package. (:

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re2: Hiding Internal Classes ?
by John M. Dlugosz (Monsignor) on Jul 11, 2001 at 01:55 UTC
    What's interesting is that $x2 doesn't have the cache like $x1 does. If the class is per-class, as I thought, then blessing it doesn't "connect" it to the cache yet.

    (I plead inocent! Undefing the package was not my idea.)

      I think the cache is per-class but $x2 tries to look up the cache by name and can't find it while $x1 has a direct link to the cache whose name was removed when you undefed the package.

              - tye (but my friends call me "Tye")
        Yea, blessing it didn't point to the cache yet. I wonder why?