in reply to Re^2: Testing for a module's presence
in thread Testing for a module's presence
In the face of possible changes to the module search algorithm, actually asking Perl to find the library and say whether it worked or not will always work, while re-implementing the library search yourself will only work for as long as nothing changes.
Using a module designed to do this, as others have suggested here, is a good compromise.
As for the cross-platform concerns, I have used fork on ActiveState Windows; it seems like a lot would break without a working copy of this function. And POSIX::_exit seems to avoid your other concerns.
Also, to clarify, I don't think using fork will be particularly fast; just faster than using system, which was my original proposal.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Testing for a module's presence
by nothingmuch (Priest) on Feb 10, 2005 at 10:12 UTC |