Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Top prerequisites based on data from CPANTS

by szabgab (Priest)
on Apr 19, 2008 at 10:49 UTC ( [id://681641]=perlmeditation: print w/replies, xml ) Need Help??

Using the sqlite database provided by CPANTS I ran a few queries. (Unreasonably) assuming I understand the schema and know how to use SQL here is the list of the top 10 modules based on number of distributions directly requiring them:
sqlite> SELECT COUNT(*) cnt, requires FROM prereq GROUP BY requires OR +DER BY cnt DESC LIMIT 10; 4324|Test::More 1181|perl 879|Carp 556|File::Spec 399|Scalar::Util 385|Test::Pod 380|LWP::UserAgent 310|DBI 292|URI 291|version
For the top 100:
4324|Test::More 1181|perl 879|Carp 556|File::Spec 399|Scalar::Util 385|Test::Pod 380|LWP::UserAgent 310|DBI 292|URI 291|version 284|Test::Exception 276|Test::Pod::Coverage 266|Test::Simple 263|Data::Dumper 248|File::Temp 242|Digest::MD5 242|POE 232|UNIVERSAL::require 228|Class::Accessor 207|Storable 205|Class::Accessor::Fast 204|Template 201|YAML 198|Catalyst 197|Module::Build 196|Time::HiRes 188|Getopt::Long 187|Exporter 181|File::Basename 177|Encode 174|DateTime 164|File::Path 164|strict 163|IO::File 153|WWW::Mechanize 152|URI::Escape 151|List::Util 151|Params::Validate 150|MIME::Base64 138|XML::Simple 131|Cwd 128|Pod::Usage 128|warnings 122|LWP 122|XML::LibXML 120|HTML::Entities 118|DBD::SQLite 116|Kwiki 115|CGI 115|File::Slurp 114|HTTP::Request 114|Log::Log4perl 113|POSIX 111|LWP::Simple 103|Class::Data::Inheritable 103|Moose 101|Class::DBI 98|File::Copy 94|Readonly 92|List::MoreUtils 92|Test::Compile 90|File::Find::Rule 83|Digest::SHA1 80|Path::Class 79|CGI::Application 79|File::Find 79|Tk 78|Params::Util 78|Parse::RecDescent 78|Test::Builder 75|FindBin 75|HTML::Parser 74|Compress::Zlib 74|DBIx::Class 71|XML::Parser 69|Fcntl 68|Error 68|Test 65|Exception::Class 65|Test::Perl::Critic 65|base 62|Catalyst::Runtime 62|IO::Scalar 62|Module::Pluggable 62|Socket 61|NEXT 61|Time::Local 60|GD 60|Test::Harness 59|Date::Parse 59|Test::Differences 58|ExtUtils::MakeMaker 58|HTML::TreeBuilder 57|Regexp::Common 56|Test::Warn 55|Class::Inspector 55|Test::MockObject 53|Filter::Simple 53|YAML::Syck 51|Clone
If we only want to include modules that are distributed on CPAN (including the dual life modules) then we have the following:
sqlite> SELECT COUNT(*) cnt, requires FROM prereq WHERE requires NOT I +N (SELECT module FROM modules WHERE dist=0) GROUP BY requires ORDER B +Y cnt DESC LIMIT 10; 4324|Test::More 556|File::Spec 399|Scalar::Util 385|Test::Pod 380|LWP::UserAgent 310|DBI 292|URI 291|version 284|Test::Exception 276|Test::Pod::Coverage
and the top 100:
4324|Test::More 556|File::Spec 399|Scalar::Util 385|Test::Pod 380|LWP::UserAgent 310|DBI 292|URI 291|version 284|Test::Exception 276|Test::Pod::Coverage 266|Test::Simple 263|Data::Dumper 248|File::Temp 242|Digest::MD5 242|POE 232|UNIVERSAL::require 228|Class::Accessor 207|Storable 205|Class::Accessor::Fast 204|Template 201|YAML 198|Catalyst 197|Module::Build 196|Time::HiRes 188|Getopt::Long 177|Encode 174|DateTime 164|File::Path 153|WWW::Mechanize 152|URI::Escape 151|List::Util 151|Params::Validate 150|MIME::Base64 138|XML::Simple 131|Cwd 128|Pod::Usage 122|LWP 122|XML::LibXML 120|HTML::Entities 118|DBD::SQLite 116|Kwiki 115|File::Slurp 114|HTTP::Request 114|Log::Log4perl 111|LWP::Simple 103|Class::Data::Inheritable 103|Moose 101|Class::DBI 94|Readonly 92|List::MoreUtils 92|Test::Compile 90|File::Find::Rule 83|Digest::SHA1 80|Path::Class 79|CGI::Application 79|Tk 78|Params::Util 78|Parse::RecDescent 78|Test::Builder 75|HTML::Parser 74|Compress::Zlib 74|DBIx::Class 71|XML::Parser 68|Error 65|Exception::Class 65|Test::Perl::Critic 62|Catalyst::Runtime 62|IO::Scalar 62|Module::Pluggable 61|Time::Local 60|GD 60|Test::Harness 59|Date::Parse 59|Test::Differences 58|ExtUtils::MakeMaker 58|HTML::TreeBuilder 57|Regexp::Common 56|Test::Warn 55|Class::Inspector 55|Test::MockObject 53|Filter::Simple 53|YAML::Syck 51|Clone 51|Math::BigInt 51|Test::Deep 50|SOAP::Lite 49|Sub::Exporter 49|Text::Balanced 48|Crypt::SSLeay 48|HTTP::Response 47|Date::Calc 47|HTTP::Request::Common 47|IO::String 46|File::HomeDir 46|Time::Piece 45|Gtk2 45|Test::Builder::Tester 44|HTML::TokeParser 44|Test::Base 43|Carp::Clan
Someone with more SQL-fu might be able to generate the list of top 10 modules when including all the other distributions that don't directly require a module.

Replies are listed 'Best First'.
Re: Top prerequisites based on data from CPANTS
by domm (Chaplain) on Apr 19, 2008 at 18:49 UTC
    I didn't look at the SQL yet, but I definitly want to include something like this to cpants.perl.org.
    -- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Re: Top prerequisites based on data from CPANTS
by educated_foo (Vicar) on Apr 19, 2008 at 14:16 UTC
    385|Test::Pod
    This makes me sad. Here are 385 obvious and trivially-fixable bugs on CPAN.

      Hmm, what do you mean with that? Do you mean that distributions don't have to come with Test::Pod? What about Test::Pod::Coverage?

        I mean that testing documentation on installation is stupid and wrong. These are tests that should be run only by the module author.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://681641]
Approved by Corion
Front-paged by hsmyers
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found