good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Related question: loading modules at run timeby dash2 (Hermit) |
on Jan 23, 2001 at 18:56 UTC ( [id://53694]=note: print w/replies, xml ) | Need Help?? |
I thought I'd add to this thread rather than start a new one. I'm writing a little script to check whois servers. One funky feature will be the ability to check for domains which don't have a whois server, only a web-based look up - like .tv domains. To do this, I have a wrapper function which chooses whether to do a normal whois or a web whois. The web whois uses the LWP module, like a good perl script. Now I don't want to load the LWP module - which is not small, right? - every time I run the script, but only when someone is looking up a .tv domain. Is there a simple way to "use" or "require" a module at run time, without getting compile time exceptions because Perl can't find methods and subroutines from the module within the code? I have a feeling AUTOLOAD has something to do with this... any deep wisdom would be gratefully received. Thanks David
In Section
Seekers of Perl Wisdom
|
|