stansult
stansult

Reputation: 1343

What Perl module to use?

How do I choose between two (or more) Perl modules, when each of them has the method(s) I need?

Upvotes: 2

Views: 187

Answers (2)

cyber-guard
cyber-guard

Reputation: 1846

Well, it really depends on what you are going after, for instance:

  1. if you are going after just that one particular function, then use the slimmer/smaller module.
  2. Check also the date when it was added, and use the newer one, as it will adhere to more current standards.
  3. Some modules also don't support OOP whilst other do, so that might be another factor to consider.
  4. Also consider dependencies of each module, because there is no reason to install a bloated module for one or two functions.
  5. Check authors notes for any bugs, etc.
  6. 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.

Upvotes: 3

Jan Thomä
Jan Thomä

Reputation: 13604

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.

Upvotes: 15

Related Questions