http://www.perlmonks.org?node_id=118075


in reply to Re: Re: Re (tilly) 1: Strict, strings and subroutines
in thread Strict, strings and subroutines

Changing @ISA at runtime is not always a good thing to do. If your application does use a lot of objects and method calls it will cause the method lookup cache to be cleared
That's the beauty of local isn't it?

Simon Flack ($code or die)
$,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
=~y'_"' ';eval"die";print $_,lc substr$@,0,3;
  • Comment on Re: Re: Re: Re (tilly) 1: Strict, strings and subroutines

Replies are listed 'Best First'.
Re (tilly) 5: Strict, strings and subroutines
by tilly (Archbishop) on Oct 10, 2001 at 22:22 UTC
    What good does that do?

    Graham's point is that when you start dynamically changing inheritance, Perl throws away its memoized method lookup results. Even if you change the inheritance right back, your cache is still gone and it has to work out results again the long way.