You'll find some info on how to load a module under conditions on the if doc. Also, the use manpage tells you that use is equivalent to: BEGIN { require Module; Module->import( LIST ); } Where require include the files, and import imports the symbols into the current namespace. You can run your require in eval to see if it succeeds or fails (for any reason):
my $ModuleIsLoaded; BEGIN { $ModuleIsLoaded = eval "require Module; 1"; }
In reply to Re: error handling by pm initialization
by Eily
in thread error handling by pm initialization
by homeveg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |