Grygonos has asked for the wisdom of the Perl Monks concerning the following question:
Felllow Monks,
Grygonos
Here is the basic idea of what I'm attempting, I want to use a different module depending on what client my script runs for. Secondly,there are some functions that exist in one client module that may not exist in another. I would like to check for the existance of a sub before I call it.
if($type eq 'x') { use Some::Module; } #*pseudo* if(subExists('mysubtocheck')) { mysubtocheck(); }
Is this possible, or a good idea? Can you suggest some alternatives?
Thanks again monks,Grygonos
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: use module if condition is met
by broquaint (Abbot) on Jan 23, 2004 at 17:08 UTC | |
Re: use module if condition is met
by Abigail-II (Bishop) on Jan 23, 2004 at 17:16 UTC | |
Re: use module if condition is met
by ysth (Canon) on Jan 23, 2004 at 17:34 UTC | |
by Grygonos (Chaplain) on Jan 24, 2004 at 02:41 UTC | |
Re: use module if condition is met
by tcf22 (Priest) on Jan 23, 2004 at 17:06 UTC | |
Re: use module if condition is met
by cfreak (Chaplain) on Jan 23, 2004 at 17:12 UTC | |
by perrin (Chancellor) on Jan 23, 2004 at 17:46 UTC |
Back to
Seekers of Perl Wisdom