Dist::Zilla::Plugin::Prereqs::DarkPAN - Depend on things from arbitrary places-not-CPAN


version v0.3.0


From time to time, people find themselves in want to depending on something that isn't from CPAN, but their team/in-house crew want a painless way to depend on it anyway.

  DDG =  ; DarkPAN Base URI
  ; optional
  DDG.minversion = 0.4.0
  ; optional
  ; But likely to be substantially faster.
  DDG.uri = /path/to/foo/bar.tar.gz

This would provide to various user commands the knowledge that DDG.tar.gz was wanted to provide the package DDG.

Our hope is one day you can just do

  # Doesn't work yet :(
  $ cpanm $( dzil listdeps )

  # Doesn't work yet :(
  $ cpanm $( dzil listdeps --missing )

and have it do the right things.

In the interim, you can do

    $ cpanm $( dzil listdeps )  \
      && cpanm $( dzil listdeps_darkpan )


    $ cpanm $( dzil listdeps --missing ) \
      && cpanm $( dzil listdeps_darkpan --missing )

and have it work.

DarkPAN Configurations.

A Simple HTTP Server

The easiest DarkPAN-ish thing that this module supports is naïve HTTP Servers, by simply setting the server and path to the resource.

  Foo = http://my.server/
  Foo.uri =  files/foo.tar.gz

You can specify an optional minimum version parameter minversion as a client-side check to make sure they haven't installed an older version of Foo.

This uri will be reported to listdeps_darkpan with minimal modification, only expanding relative paths to absolute ones so tools like cpanm can use them.

A MicroCPAN Configuration

There is a newly formed system for creating "proper" CPANs which only contain a handful of modules. For these services you can simply do

  Foo = http://my.server/

And we'll fire up all sorts of magic to get the 02packages.details.tar.gz file, shred it, and try installing 'Foo' from there.

Heavier CPAN configurations

The 3rd use case is when you have somewhat heavy-weight private CPANs where you don't want to be encumbered by the weight of downloading and parsing 02packages.details.tar.gz. If you have a full CPAN clone with a few modules stuffed into it, and you only want those stuffed modules while using normal CPAN ( because the cloned versions from CPAN are now old ), its possibly better to use the original notation

  Foo = http://my.server/
  Foo.uri = path/too/foo.tar.gz

As it will only fetch the file specified instead of relying on 02packages.details.tar.gz

Granted, this latter approach will bind again to downloading a specific version of the prerequisite, but this is still here for you if you need it.


Kent Fredric <>


This software is copyright (c) 2017 by Kent Fredric <>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.