That is actually what I was thinking, but I am not very good at perl, so
I was not sure that that method would work, and I saw the other in a
test script that I knew did work, so I was inclined to go with what I
know, and leave the refining to others who knew more.
Thanks for the tip,
Kyle Moffett
On Wednesday, January 16, 2002, at 06:58 , Randal L. Schwartz wrote:
>>>>>> "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
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel