What Perl module to use?
Ho开发者_StackOverflow中文版w do I choose between two (or more) Perl modules, when each of them has the method(s) I need?
I'd check
- if the API supports my use case.
- If both APIs do, choose the module that is easier to work with.
- If both APIs are equally easy to work with, choose the one with better documentation/support.
- If both are equally well documented/supported, choose the that has less dependencies.
- If both have the same amount of dependencies, take the smaller one.
- If both are about equal, choose the one with more releases / more active development / more passes in the test matrix (courtesy of Eric Strom)
- If both still are equal, roll a dice.
Your preferences may vary so you might want to reorder the list, depending on your preferences.
Well, it really depends on what you are going after, for instance:
- if you are going after just that one particular function, then use the slimmer/smaller module.
- Check also the date when it was added, and use the newer one, as it will adhere to more current standards.
- Some modules also don't support OOP whilst other do, so that might be another factor to consider.
- Also consider dependencies of each module, because there is no reason to install a bloated module for one or two functions.
- Check authors notes for any bugs, etc.
- And you can do research on your own, consult google and perlmonks because the chances are that someone already pondered dilemma between choosing those particular modules.
精彩评论