yoda54 has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a general utility script with multi functions like the one below. My questions is when I run this on a system that is missing certian modules the script bombs. How can I avoid this behavior? I would like a script to continue doing whatever it can without it exiting. As always Thanks!!
#!/usr/bin/perl use Getopt::Long; GetOptions("tk" => \$tk); if ($tk) { &tk(); } do this do whatever.... blah more blah sub tk { use Tk; use strict; more blah blah and yet more blah }
Edited by Chady -- moved text outside of code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to keep a script from bombing due to a missing module?
by Nkuvu (Priest) on May 22, 2004 at 05:38 UTC | |
|
Re: How to keep a script from bombing due to a missing module?
by saintmike (Vicar) on May 22, 2004 at 05:42 UTC | |
by eyepopslikeamosquito (Archbishop) on May 22, 2004 at 10:05 UTC | |
|
Re: How to keep a script from bombing due to a missing module?
by bobn (Chaplain) on May 22, 2004 at 19:09 UTC |