Skip to content

companieshouse/gopan

 
 

Repository files navigation

GoPAN

GoPAN provides a full end-to-end toolchain to mirror, index, host and install from a CPAN, BackPAN or DarkPAN repository.

Mirrors hosted by SmartPAN are fully Carton/cpanm compatible, but also support the SmartPAN interface used by GetPAN.

GetPAN is also Carton/cpanm compatible and works with CPAN, BackPAN, and DarkPAN mirrors using Pinto and Orepan.

When used with SmartPAN, the SmartPAN interface fixes dependency resolution issues which exist with typical CPAN indexes.

Application Description
SmartPAN Host a DarkPAN, BackPAN or CPAN mirror
GetPAN Carton/cpanfile compatible dependency installer
MirroPAN CPAN/BackPAN brute-force mirroring
PANdex CPAN module indexer

Getting started

Requirements

You need Perl (preferably >=5.18.2) and the following modules for indexing (used by PANDex and SmartPAN).

  • Parse::LocalDistribution
  • JSON::XS

Setting up

$ go get github.com/companieshouse/gopan
$ cd $GOPATH/src/github.com/companieshouse/gopan
$ make

Use getpan to simplify installation:

getpan Parse::LocalDistribution JSON::XS
getpan exec smartpan

All other GoPAN tools are entirely self-contained.

Replacing Carton/cpanm

Use GetPAN in place of Carton or cpanm.

Note GetPAN uses cpanm internally, but dependency resolution is handled by GetPAN to avoid versioning issues with CPAN indexes.

Hosting a DarkPAN (or CPAN/BackPAN mirror)

Use SmartPAN from any empty directory.

Make sure you have Perl, Parse::LocalDistribution and JSON::XS installed.

Mirroring CPAN, BackPAN or any other DarkPAN index

Use MirroPAN from any empty directory.

You'll need around 40GB of free space to mirror CPAN and BackPAN.

Indexing a local mirror

Use PANdex to index any local CPAN, DarkPAN or BackPAN mirror.

This can be used to generate an index file for a mirror created with MirroPAN.

Why?

It's faster. And it gets dependencies right.

It's also written in Go - so its highly portable with no installation!

Contributing

See the Developing GoPAN guide.

Licence

Copyright ©‎ 2014, Ian Kent (http://www.iankent.eu).

Released under MIT license, see LICENSE for details.

About

Perl dependency management toolchain

Resources

License

Stars

Watchers

Forks

Languages

  • Go 88.4%
  • HTML 10.4%
  • Other 1.2%