in reply to defining methods on the fly
Just keep in mind that you invalidate your method-lookup cache everytime you invoke that code. Normally once perl knows what function belongs to a method call on an object from a particular class it's able to cache that and not do the work of looking all around ISA. Whenever you change something that could cause the cached value to be incorrect, perl discards all it's cached information. Those somethings are changing @ISA anywhere or altering the symbol table. Glob assignments like you did are one of those explicit reasons. Your code won't even work unless perl does this.
So just be aware you're making perl's OO slow for you. It has to do work that most people's perl won't have to.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: defining methods on the fly
by flogic (Acolyte) on Aug 03, 2006 at 14:37 UTC | |
by diotalevi (Canon) on Aug 03, 2006 at 16:18 UTC | |
by jdhedden (Deacon) on Aug 03, 2006 at 19:14 UTC | |
by flogic (Acolyte) on Aug 03, 2006 at 20:24 UTC | |
by revdiablo (Prior) on Aug 04, 2006 at 17:37 UTC | |
by jdhedden (Deacon) on Aug 05, 2006 at 01:57 UTC |