Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^8: perl inheritance

by JavaFan (Canon)
on Mar 24, 2012 at 13:46 UTC ( #961401=note: print w/ replies, xml ) Need Help??


in reply to Re^7: perl inheritance
in thread perl inheritance

Well, I can imagine putting assignments to @ISA in a BEGIN block if you have the habit of putting other things in a BEGIN block.

I typically have my assignment to @ISA near the top of the file, before any method calls are done. And that never is a problem.

Perl has always tried to invalidate method caches on assignment to @ISA -- although in a dim past, there was a bug preventing this to happen. This was fixed in 5.004 or 5.005. Long enough ago to not care about anymore. Not that method cache has any reason to be relevant here; for that to be relevant, we need to have something like:

  • Assign to @ISA.
  • Call a method "X".
  • Assign to @ISA so X resolves to a *different* sub.
  • Call method "X" again.


Comment on Re^8: perl inheritance

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-12-21 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls