Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re (tilly) 1: Strict, strings and subroutines

by gbarr (Monk)
on Oct 10, 2001 at 19:16 UTC ( [id://118007]=note: print w/replies, xml ) Need Help??


in reply to 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. So it will have the affect of slowing your program down. By how much, and if that is an issue really depends on the application though.
  • Comment on Re: Re: Re (tilly) 1: Strict, strings and subroutines

Replies are listed 'Best First'.
Re: Re: Re: Re (tilly) 1: Strict, strings and subroutines
by $code or die (Deacon) on Oct 10, 2001 at 22:03 UTC
    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;
      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://118007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found