ggg has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking for a way to tell if a series of modules has loaded without having the script die on failure to load. My only idea so far is shown below, but it doesn't work. Out of desperation, I've tried backticks around use CGI but, predictably, that fails also. I don't want to use a use CGI or die kind of construct because I want feedback to know if all the modules loaded or which (if any) modules failed to load.
Is there a way to do this?
if (use CGI){ print "use CGI worked\n"; } else{ print "failed\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: feedback on successful module loading
by ikegami (Patriarch) on Oct 07, 2004 at 14:47 UTC | |
|
Re: feedback on successful module loading
by ccn (Vicar) on Oct 07, 2004 at 14:42 UTC | |
|
Re: feedback on successful module loading
by Marcello (Hermit) on Oct 07, 2004 at 15:29 UTC | |
|
Re: feedback on successful module loading
by diotalevi (Canon) on Oct 07, 2004 at 22:30 UTC | |
|
Re: feedback on successful module loading
by ggg (Scribe) on Oct 07, 2004 at 18:58 UTC | |
by merlyn (Sage) on Oct 07, 2004 at 21:22 UTC | |
by diotalevi (Canon) on Oct 07, 2004 at 22:34 UTC | |
by ggg (Scribe) on Oct 08, 2004 at 05:17 UTC |