SlideShare a Scribd company logo
CPANTS
Kwalitative website and its tools

                    Kenichi Ishigaki
                         (charsbar)
                   @YAPC::EU 2012
                   August 22, 2012
Kenichi Ishigaki
   (charsbar)
From Shibuya.pm,
  Tokyo, Japan.
Freelancer

 - Perl programmer
- Writer/Translator
Around 40 CPAN
 distributions
DBD::SQLite
Acme::CPANAuthors
We have been
 enjoying the
CPANTS game
 since 2005.
輝け!全日本最強
 CPAN Author
  決定選手権
            by Koichi Taniguchi
http://blog.livedoor.jp/nipotan/archives/16108466.html
He picked up
Japanese authors
    by eye.
Our names are
 easy to find.
There were not
so many authors.

  - Total: ~4000
 - Japanese: ~50
YAPC::Asia increased
  the number of
 Japanese authors.
YAPC::Asia / Japanese authors

   2006 (Mar)       98
   2007 (Apr)      154
   2008 (May)       191
   2009 (Sep)      228
   2010 (Oct)      255
   2011 (Oct)      270
Needed
something to pick
   up Japanese
  authors more
      easily.
That's why I
created a list of
Japanese authors
 and a script to
   maintain it.
I've been
 reporting the
Japanese top 10
 authors since
     2008.
I've been adding
 something new
   every year.
2008: sum of the
 kwalitee scores
   per author
2009: authors
 who released
most in the year
2010: authors/
population ratio
2011: launched a
website (finally)

acme.cpanauthors.org
CPANTS: Kwalitative website and its tools
It had one big
   problem.
No data.
The official
CPANTS site had
 been down for
   some time.
I needed to set
    up mine.
I created a
private repository
and put everything
       into it.
Merged recent
commits from
   domm's
 repository.
Added a few
 columns.
Tweaked
Catalyst/DBIC
    stuff.
It worked.
Warnings were
    left.
I needed to find
  some tuits to
 remove them.
Perl QA
Hackathon
CPANTS: Kwalitative website and its tools
Warnings were
  removed.
Ported some of
the changes I did
locally to daxim's
   repository.
Showed a new
 acme.cpanauthors.org
featuring CPANTS info.
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its tools
Unfortunately,
the porting took
 too much time.
I didn't merge
the changes back
to my repository.
OSDC.TW
I finally merged
  the changes.
Got several
reports that
CPANTS was
  broken.
What broke
CPANTS was a
 small change.
"modules" : [
  {
    "file" : "lib/Path/Extended.pm",
    "in_basedir" : 0,
    "in_lib" : 1,
    "module" : "Path::Extended",
    "uses" : {
       "Sub::Install" : 1,
       "strict" : 1,
       "warnings" : 1
    }
  }
]
I don't think this
  change is bad.
Module::CPANTS::
  ProcessCPAN
 shouldn't have
  died by this.
It should have
  had tests.
Is should have
  run faster.
It should have
been easier to fix
    analysis.
Enough issues for
   a summer.
What should we
     do?
- We need tests.
- we need to find
   test cases.
- we need to do it
   many times.
Making it run
faster is the
first priority.
I wrote a
barebone script
to store data in
    parallel.
JSON
create table if not exists analysis (
      id integer primary key autoincrement,
      path text unique,
      distv text,
      author text,
      json text,
      duration integer
);
Raw SQL
statements
Parallel::ForkManager
SQLite queue
Beware a race condition

my ($id) = $dbh->selectrow_array("
  SELECT id FROM queue
  WHERE status = 0 LIMIT = 1
");
$dbh->do("
  UPDATE queue SET status = 1
  WHERE id = ?
", undef, $id);
sqlite_update_hook

my $id;
my $dbh->sqlite_update_hook(sub {
  (undef, undef, undef, $id) = @_;
});
$dbh->do("
  UPDATE queue
    SET status = 1,
  WHERE id IN (
    SELECT id FROM queue
    WHERE status = 0 LIMIT 1
  )
");
Archive::Any::Lite
Archive::Any::Plugin::Bzip2
WorePAN

- Bundling is bad
- We need a specific
version
- Derived from OrePAN
use WorePAN;

my $worepan = WorePAN->new(
  root => 'path/to/a/directory/',
  files => [qw(
    I/IS/ISHIGAKI/WorePAN-0.01.tar.gz
  )],
  use_backpan => 1,
  no_network => 0,
  cleanup     => 1,
);
use WorePAN;

my $worepan = WorePAN->new(
  root => 'path/to/a/directory/',
  files => [qw(
    I/IS/ISHIGAKI/WorePAN-0.01.tar.gz
  )],
  local_mirror => '/home/ishigaki/minicpan/',
  no_network => 1,
  cleanup     => 1,
);
use WorePAN;

my $worepan = WorePAN->new(
  root => 'path/to/a/directory/',
  dists => {
    'Catalyst-Runtime' => 5.9,
    'DBIx-Class'    => 0,
  },
  cleanup => 1,
);
Bonus features
my $worepan = WorePAN->new(
  root => 'path/to/a/CPAN/mirror/',
  cleanup => 0,
);

my   $authors = $worepan->authors;
my   $modules = $worepan->modules;
my   $file = $worepan->files;
my   $dists = $worepan->latest_distributions;
$worepan->add_files(qw{
  /path/to/a/local/distribution-0.01.tar.gz
});
$worepan->update_indices;
Now we have
enough tools.
Processing time is
   significantly
    decreased.
What's next?
::Site refactoring
I'm preparing the
    data now.
Creating more
databases/tables.
Merging
information from
external sources.
- CPAN indices
- CPAN uploads database
Calculating scores
 on prerequisite
     modules.
It will be this
year's something
new in my annual
     report.
And then, I'll
move on to fixing
  the metrics.
Some of them are
  badly broken.
"versions" : {
  "lib/Data/Phrasebook.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Debug.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Generic.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Loader.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Loader/Base.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Loader/Text.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/Plain.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/SQL.pm" : "use vars qw($VERSION);¥n",
  "lib/Data/Phrasebook/SQL/Query.pm" : "use vars qw($VERSION);¥n"
},
Error is not a stash.
"error" : {
  "easily_repackageable" : "easily_repackageable_by_fedora",
  "easily_repackageable_by_fedora" : "fits_fedora_license",
  "metayml_conforms_spec_current" : [
    "1.4",
    "Expected a map structure from data string or file. [Validation: 1.4]"
  ],
  "metayml_conforms_to_known_spec" : [
    "1.0",
    "Expected a map structure from data string or file. [Validation: 1.0]"
  ],
  "no_pod_errors" : " home cpants tmp analyze 11442 8001be43fb65..."
}
Should have
initialize/finalize phases.

Module::CPANTS::Kwalitee::Distros
 doesn't clean up after mirrored
       Debian CPANTS file
    https://rt.cpan.org/Ticket/Display.html?id=51514
There are much more
       to do.
-   JSON API for metacpan.org and so on.
-   Email Reporting like CPAN Testers
-   Evaluate new Kwalitee indicators
-   New metrics like portable filename
-   Blog about recent tendency
-   More comprehensive tests
-   Analysis per perl version/architecture
-   Cover Perl::Critic, CPAN::Critic::Module::Abstract
-   35 RT tickets and several github isses
Resources
     github.com/charsbar/www-cpants
       github.com/charsbar/worepan
github.com/daxim/Module-CPANTS-Analyse
Questions?
Thank you

More Related Content

PDF
Mito, a successor of Integral
PDF
Lies, Damn Lies, and Benchmarks
PDF
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
PDF
Be a microservices hero
PDF
HBase RowKey design for Akka Persistence
PDF
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
PDF
kRouter
PDF
Dexador Rises
Mito, a successor of Integral
Lies, Damn Lies, and Benchmarks
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
Be a microservices hero
HBase RowKey design for Akka Persistence
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
kRouter
Dexador Rises

What's hot (20)

PDF
Developing OpenResty Framework
PPTX
PSGI and Plack from first principles
PDF
Tdc 2013 - Ecossistema Ruby
KEY
DSLs Internas e Ruby
PDF
Lessons Learnt in 2009
PDF
Welcome to Swift (CocoaCoder 6/12/14)
PDF
Advanced JavaScript build pipelines using Gulp.js
PDF
CouchDB: A NoSQL database
PDF
Async and Non-blocking IO w/ JRuby
PDF
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
PDF
Plumbin Pipelines - A Gulp.js workshop
PDF
Intro to Rails
PPTX
Lisp in the Cloud
PDF
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
PDF
Solr for Indexing and Searching Logs
PDF
Async - react, don't wait - PingConf
PDF
Painless Data Storage with MongoDB & Go
PDF
Distributed Developer Workflows using Git
PPTX
DevOps with Fabric
PDF
Smalltalk on rubinius
Developing OpenResty Framework
PSGI and Plack from first principles
Tdc 2013 - Ecossistema Ruby
DSLs Internas e Ruby
Lessons Learnt in 2009
Welcome to Swift (CocoaCoder 6/12/14)
Advanced JavaScript build pipelines using Gulp.js
CouchDB: A NoSQL database
Async and Non-blocking IO w/ JRuby
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
Plumbin Pipelines - A Gulp.js workshop
Intro to Rails
Lisp in the Cloud
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
Solr for Indexing and Searching Logs
Async - react, don't wait - PingConf
Painless Data Storage with MongoDB & Go
Distributed Developer Workflows using Git
DevOps with Fabric
Smalltalk on rubinius
Ad

Viewers also liked (14)

PDF
少人数でのWebアプリ開発 CGIからPSGIまでの変遷
PDF
What you need to remember when you upload to CPAN
PDF
2013年のCPANモジュール作成事情
PPTX
Проект планировки 1 микрорайон Губкинский
PPTX
Презентация ПП линейных объектов в с. Бердюжье
PPTX
Hals development(iq) 03.09
PDF
ПРОЕКТ ПО СОЗДАНИЮ «ГОСТЕВЫХ ДОМОВ»
PPTX
Hals development(камелия) 03.09
PPT
On UnQLite
PPTX
Infrastructure of Pathtraq
PDF
Bpmrapport2008
PDF
NetApp Session at PEX Tokyo 2013
PDF
「アレ」と Perl で AWS を - YAPC::Asia Tokyo 2013
PDF
Artikel 4+2 procesmodel v1.0
少人数でのWebアプリ開発 CGIからPSGIまでの変遷
What you need to remember when you upload to CPAN
2013年のCPANモジュール作成事情
Проект планировки 1 микрорайон Губкинский
Презентация ПП линейных объектов в с. Бердюжье
Hals development(iq) 03.09
ПРОЕКТ ПО СОЗДАНИЮ «ГОСТЕВЫХ ДОМОВ»
Hals development(камелия) 03.09
On UnQLite
Infrastructure of Pathtraq
Bpmrapport2008
NetApp Session at PEX Tokyo 2013
「アレ」と Perl で AWS を - YAPC::Asia Tokyo 2013
Artikel 4+2 procesmodel v1.0
Ad

Similar to CPANTS: Kwalitative website and its tools (20)

PPT
CPANTS 2012
PDF
CPAN 模組二三事
PDF
CPANci: Continuous Integration for CPAN
PDF
Painless Perl Ports with cpan2port
PDF
Searching CPAN Offline
KEY
Modern Commandline Tool
PPT
Revisiting ppm
ODP
Владимир Перепелица "Модули"
PDF
21st Century CPAN Testing: CPANci
PDF
Packaging perl (LPW2010)
PDF
Benchmarking Perl (Chicago UniForum 2006)
PDF
MyCPAN ( LA.pm, September 2007 )
ODP
30 Minutes To CPAN
PDF
Perl Dist::Surveyor 2011
PDF
Keynote 1 - Engineering Software Analytics Studies
PPTX
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
PDF
Managing Perl Installations: A SysAdmin's View
PDF
CPAN Training
PDF
Care and feeding notes
PDF
Modern Getopt for Command Line Processing in Perl
CPANTS 2012
CPAN 模組二三事
CPANci: Continuous Integration for CPAN
Painless Perl Ports with cpan2port
Searching CPAN Offline
Modern Commandline Tool
Revisiting ppm
Владимир Перепелица "Модули"
21st Century CPAN Testing: CPANci
Packaging perl (LPW2010)
Benchmarking Perl (Chicago UniForum 2006)
MyCPAN ( LA.pm, September 2007 )
30 Minutes To CPAN
Perl Dist::Surveyor 2011
Keynote 1 - Engineering Software Analytics Studies
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Managing Perl Installations: A SysAdmin's View
CPAN Training
Care and feeding notes
Modern Getopt for Command Line Processing in Perl

More from charsbar (20)

PPT
Common boolean class_for_perl5
PPT
2018年夏のPerl5
PDF
萬國之津梁
PDF
Better detection of what modules are used by some Perl 5 code
PPT
2017年夏のPerl
PPT
2017年春のPerl
PPT
Json(::PP) is a-changing
PPT
2016年のPerl (Long version)
PPT
JSON, JSON::PP, and more
PPT
perl language update
PPT
CPANの依存モジュールをもう少し正しく検出したい
PPT
typemap in Perl/XS
PDF
Analyze CPAN, Analyze Community
PDF
Annual Report 2012
PDF
DBD::SQLite
PDF
Mojolicious::Liteを使ってみよう
PPT
変数、リファレンス
PPT
關於perl的 文件翻譯
PPT
Practical Bug Reporting
PPT
Top Tens of 2008/2009
Common boolean class_for_perl5
2018年夏のPerl5
萬國之津梁
Better detection of what modules are used by some Perl 5 code
2017年夏のPerl
2017年春のPerl
Json(::PP) is a-changing
2016年のPerl (Long version)
JSON, JSON::PP, and more
perl language update
CPANの依存モジュールをもう少し正しく検出したい
typemap in Perl/XS
Analyze CPAN, Analyze Community
Annual Report 2012
DBD::SQLite
Mojolicious::Liteを使ってみよう
変数、リファレンス
關於perl的 文件翻譯
Practical Bug Reporting
Top Tens of 2008/2009

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Monthly Chronicles - July 2025
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf

CPANTS: Kwalitative website and its tools