Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Too many alternatives in CPAN

by targetsmart (Curate)
on Mar 20, 2009 at 07:33 UTC ( #751950=perlquestion: print w/replies, xml ) Need Help??

targetsmart has asked for the wisdom of the Perl Monks concerning the following question:

I love cpan, the below text is purely a wish list for CPAN.
I thought this is the right place to ask and clarify if I have to know something on this matter.

Some times i get too impatient while searching some modules in CPAN, suppose I want to write log messages into files and i needed some modules for that, I go and search in CPAN as 'log file', it is giving me 1700+ alternatives
how do I know which is best to use for simple/complex logging on files?
If i go to and do a search, they sort the projects by Relevance, Activity, Rank, Registered, Latest File and Downloads, why can't CPAN give such a helpful search results? (I know that behind there are too many working towards giving such a perfect interface, but even though in CPAN we can't give all that, atleast we can give, downloads and rank.)

Or otherwise guide me how to fetch a relevant, reliable, easy to use, easy to maintain module in CPAN easily, it can of any type like

file logging
tcp sockets

-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re: Too many alternatives in CPAN
by missingthepoint (Friar) on Mar 20, 2009 at 08:50 UTC

    I've never had much success with searching CPAN by functionality - often I want something specific which may not appear in the module name or description (I don't know if even looks at descriptions).

    A better approach, I've found, is to look for previously asked questions by searching for likely phrases on various sites (Perlmonks being foremost). Example: I want a module that does X, search for "how do I do X", "problem doing X", "doing X doesn't work" (more or less, allowing for proper grammar etc. depending on the value of X).

    This usually shows up code with use statements or module recommendations or (best case) admonitions to "just use Some::Mod, you'll want to eventually anyway" (WWW::Mechanize for most web client stuff would be an example of the latter).

    "Half of all adults in the United States say they have registered as an organ donor, although only some have purchased a motorcycle to show that they're really serious about it."
Re: Too many alternatives in CPAN
by bellaire (Hermit) on Mar 20, 2009 at 11:25 UTC
    I frequently find myself using Google as a substitute search engine over various sites' integrated searches, including CPAN. I just do a google on my search terms For example, in this case a google search for log file returns a few useful options near the top. IIRC, the second result Log::Log4Perl is a fairly common option for logging in Perl.

    This isn't a foolproof approach, but I favor it because Google will tend to rank pages which are frequently linked for your search terms higher than pages which aren't. The only drawback is that occasionally someone has named a module to match your search terms exactly, but through bad luck that module is actually either inappropriate, broken, not maintained, etc. Google will still rank it highly simply due to the exactness of the match to your search terms.
Re: Too many alternatives in CPAN
by JavaFan (Canon) on Mar 20, 2009 at 12:05 UTC
    how do I know which is best to use for simple/complex logging on files?
    That's not a simple question, and a question CPAN will never even attempt to answer. CPAN is just a medium. It allows anyone to upload anything, and to download anything. It tries to index things as best as it can, but it doesn't judge. Any module is as equal as the other. It doesn't have a fad-of-the-week. It doesn't favour incrowd over newbies. It doesn't tell you what you should use.

    As for your question, what is "best" depends on what you think it good in a module. Do you rank speed over ease of use? Do you prefer objects over a procedural interface? And when is logging simple or complex anyway? Considering those answers will vary from person to person, it would be very hard for someone to say "you should module X" - assuming you want that someone to have your best interest in mind. Not to mention said someone should reevaluate which module is best each time a new logging module hits CPAN.

Re: Too many alternatives in CPAN
by artist (Parson) on Mar 20, 2009 at 12:09 UTC
    You are looking for 'how to do X' with CPAN module directory listing.

    My approach so far is keeping up with knowledge and use by experience. After that I use Perlmonks search. When I don't find it I usually ask here. A better approach would see me using modules in better ways.

    It may not be as straight forward as In Perl, there is more than one way to do it. It is for the community but also by the community. It is not about use one and forget the rest. It is about contributing in such a manner that others can directly benefit from it. The few sections on Perl such as Q&A and Snippet provides this nicely.

    Said that you can try searching here for previously reviewed modules. Tagging CPAN modules by community would help enhancing system further. We can have also 'if you are using this module', you may also want to use that module, where each user can put module suggestion as they work along. We have to configure it to use with practice, rather than knowledge dump.

Re: Too many alternatives in CPAN
by zby (Vicar) on Mar 20, 2009 at 13:17 UTC
Re: Too many alternatives in CPAN
by sundialsvc4 (Abbot) on Mar 20, 2009 at 13:32 UTC

    Just ask. Here.

      Or search (here), as someone else has probably already asked.
Re: Too many alternatives in CPAN
by toolic (Bishop) on Mar 20, 2009 at 23:46 UTC
Re: Too many alternatives in CPAN
by CountZero (Bishop) on Mar 21, 2009 at 07:19 UTC
    The Phalanx Top 100 used to be a good start, but it is getting a bit dated now.


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Too many alternatives in CPAN
by Jenda (Abbot) on Mar 21, 2009 at 16:04 UTC

    "why can't CPAN give such a helpful search results" ... because it can't.

    1. Relevance - looks to me like this is how it's sorted. The relevance according to your search against the module names and descriptions.
    2. Activity - activity may mean something useful for big projects, where there's (almost) always what to add, what to improve, what to fix. This is not the case with small libraries. There are often used, recommended modules, that had not been updated in months. Sometimes years. Because there's no need to add anything, nothing to fix and the author not the users feel the need to improve what works well and is tested and proven.
    3. Rank - please define.
    4. Registered - you mean the date? I don't see how would it help.
    5. Latest file - see above about Activity.
    6. Downloads - no we can't give that. Keep in mind that CPAN is not a centralized resource. It's comprised of many mirrors ... you can't get the download statistics for all. Plus you would have to add the stats from PPM repositories. Otherwise the numbers especially for Windows related modules would be almost zero.

    With all this said ... what would you base your Rank on? There are some reviews and some ratings, but there are far too few to be dependable.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://751950]
Approved by moritz
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-12-07 12:21 GMT
Find Nodes?
    Voting Booth?

    No recent polls found