>>>>> "Kyle" == Kyle Moffett <[EMAIL PROTECTED]> writes:
Kyle> I found a way to detect if Storable.pm exists, at runtime. Pulled
Kyle> this from the xml-simple-pm package, it was in one of the test scripts.
Kyle> eval ( require Storable; };
Kyle> if ($INC{'Storable.pm'}) $somevar{'storable'} = 'True';
This is simpler:
if (eval { require Storable; 1; }) { ... }
and it can even be executed multiple times with very little overhead.
There's no point in checking %INC, when the eval will either return
its last expression, or return undef if failed.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel