I have a CPAN ready module, packaged according and conforming to the modern practices. That is to say, it declares its required and optional dependencies in META.yml, and the build system is M::B (but I could change that, if necessary).

I do not want to publish it on CPAN. However, I wish to give the tarball to other people to install. I wish them to have a pleasant installation experience, i.e. not need to hunt down dependencies manually. If possible, I do not wish to deviate from established ways and instead leverage the standard tools we are familiar with, as the end user assumably might be familiar with them, too.

Unfortunately, this does not work:

$ cpan My-Module-0.01.tar.gz
Going to read $HOME/.cpan/Metadata
Warning: Cannot install My-Module-0.01.tar.gz, don't know what it is.
Try the command

    i /My-Module-0.01.tar.gz/

to find objects with matching identifiers.


Neither does this:

$ cpanp -i My-Module-0.01.tar.gz
[MSG] No '$HOME/.cpanplus/custom-sources' dir, skipping custom sources
[ERROR] 'My-Module-0.01.tar.gz' does not contain an author part

[ERROR] Cannot find 'My-Module-0.01.tar.gz' in the module tree

No such module: My-Module-0.01.tar.gz
No modules found to operate on!
Nothing done


The CPAN(PLUS) tools are much more stupid than I thought they are.

All dependencies are available on CPAN. I think I can get away with requiring that the end user has 5.010, but if your proposal works under 5.8.8, that would be Fine Too.

This works, but is not very pleasant. Do you have an idea how to condense it?

$ cpan Dependency::Foo Dependency::Bar
$ tar -xvzf My-Module-0.01.tar.gz
$ cd My-Module-0.01/
$ perl Build.PL
$ ./Build
$ ./Build test
$ sudo ./Build install

In reply to How to install a DarkPAN module? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.