Design Overview

schwern edited this page Jan 6, 2013 · 1 revision
Clone this wiki locally


Gitpan is split up into several areas of responsibility.


Fetching historical releases of CPAN distributions. Since there's no formal concept of a "CPAN distribution" this also figures out what the distributions are and what their releases are.

Handled by Gitpan::Role::HasBackpanIndex via BackPAN::Index.

CPAN Unpacker

Fetch and unpack CPAN releases and figure some things about them.

Handled by CPANPLUS::Backend and Archive::Extract in import_one_backpan_release() of Git::CPAN::Patch::Import. Needs to be broken out into its own class.

CPAN Distribution

Representing a CPAN distribution like Test-Simple or libwwwperl.

Gitpan::Dist links together a distribution's BackPAN, GitHub, Git and Release pieces.

CPAN Release

Representing a single release of a distribution like Test-Simple-1.23.tar.gz.

Not yet built.

CPAN Watcher

Determining the releases since the last time we were updated.

Not yet built.


Who did what, when and how do we fix it?

Needs to handle the possibility of parallel processing. Logging probably would be per distribution.

Not yet built.


Managing the git repository for each distribution.

Handled by Gitpan::Git via Git::Repository.


Managing each distribution's repository on GitHub.

Gitpan is a GitHub organization, rather than a user.

Handled by Gitpan::Github via Net::GitHub::V3.


A machine to periodically update Gitpan with a local BackPAN mirror for performance.

Doesn't need a lot of CPU or power, just disk to hold BackPAN and the git repositories.

Currently generously hosted by Integra Telecom.


The program which puts it all together, running on a cron job.

Needs to be able to both create repositories, update them and recover from errors without human intervention.

Not yet built.