Your skill will accomplish what the force of many cannot |
|
PerlMonks |
How to install a DarkPAN module?by Anonymous Monk |
on Jan 28, 2009 at 12:33 UTC ( [id://739525]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: 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
Back to
Seekers of Perl Wisdom
|
|