jmay has asked for the wisdom of the Perl Monks concerning the following question:
if (defined eval "require My::Module") { print "all's well\n"; } else { print "nope, figure out a workaround\n"; }
But is this likely to be too harsh? There are other conditions that could cause require to fail besides "Can't locate My/Module.pm in xxx".
Suggestions appreciated,
-Jason
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best way to check for installed module
by ehdonhon (Curate) on Apr 04, 2002 at 19:43 UTC | |
|
Re: Best way to check for installed module
by extremely (Priest) on Apr 04, 2002 at 20:47 UTC | |
|
Re: Best way to check for installed module
by Juerd (Abbot) on Apr 04, 2002 at 19:44 UTC | |
by extremely (Priest) on Apr 04, 2002 at 20:40 UTC | |
|
Re: Best way to check for installed module
by maverick (Curate) on Apr 04, 2002 at 19:47 UTC | |
|
Re: Best way to check for installed module
by DigitalKitty (Parson) on Apr 04, 2002 at 20:57 UTC | |
by count0 (Friar) on Apr 05, 2002 at 14:06 UTC |