Perl Monk, Perl Meditation | |
PerlMonks |
Most effective way to dynamically load a module?by BerntB (Deacon) |
on Aug 22, 2006 at 03:59 UTC ( [id://568751]=perlquestion: print w/replies, xml ) | Need Help?? |
BerntB has asked for the wisdom of the Perl Monks concerning the following question:
I have some persistent objects dumped into a database. To make certain that the object's package is loaded when reading in the object, I use this:
This works but I wonder about efficiency. Two questions:
I found an alternative to can a while ago by searching the usual suspects (Google, my books, monks). To see if the package is loaded, check for a package's symbol table:
This symbol table test didn't work consistently for me? Should it -- did I do something wrong? Yes, I am optimizing the wrong details. I haven't kludged around with the symbol tables much and is fishing a bit for discussion and pointers. :) Maybe I should just get some more books, but I am looking for work right now. :-)
Back to
Seekers of Perl Wisdom
|
|