in reply to dynamic inheritance

bikeNomad and I ran into this in his Class::Prototyped. The problem is indeed @ISA caching, and (to my knowledge) it wasn't fixed in 5.6.1. My workaround is:

delete ${"$package\::"}{'::ISA::CACHE::'};

where $package is the name of the package containing the modified @ISA. Of course, you might find that CPAN module interesting...

Update: We ran into the problem while adding to @ISA, so my guess is that any changes are troublesome. It's been a while since I read the source, though.

Replies are listed 'Best First'.
Re: Re: dynamic inheritance
by frag (Hermit) on Jan 31, 2002 at 16:31 UTC
    Out of curiosity, is the @ISA caching a problem only when you're deleting items from @ISA, or also for adding items?

    -- Frag.
    --
    "It's beat time, it's hop time, it's monk time!"

Re: Re: dynamic inheritance
by steves (Curate) on Jan 31, 2002 at 18:41 UTC

    You the man chromatic. That did the trick. Thanks for the tip. I'll check out Class::Prototyped.

    Perl maintains its record with me. In addition to There's More Than One Way To Do It my other Perl motto is There's Always A Way To Do It.