This one does the "funky" thing :-)

foreach ("Digest::MD5","Crypt::DES",Crypt::CBC");
  eval "use $_;";
  if ($@) {
    print "Can't locate module $_\n";           
  } else {
    print "Found module $_\n";
  }
}

Tobias

At 04:20 PM 1/11/00 -0500, Berghold, Peter wrote:
>
>       I saw a code sniglet somewhere where you can do some sort of funky
>eval statement that wraps up the "use" line to see if the module was loaded
>successfully.  Look in the CPAN module source.  I think it was in there....
>
>
>Peter L. Berghold      Lehman Brothers     Unix Engineering
>Unix Architect         VOX: (201) 524-5018  [EMAIL PROTECTED]
>Australian Cattle Dog Philosophy: "Seize the Cow! Bite the Day!"
>
>

Reply via email to