Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Releasing a CPAN module using Dist::Zilla & perlbrew

by bliako (Monsignor)
on Dec 30, 2021 at 11:44 UTC ( [id://11140034]=note: print w/replies, xml ) Need Help??


in reply to Releasing a CPAN module using Dist::Zilla & perlbrew

I have tried to install it to my computer. It fails with:

[DZ] attempt to add META.yml multiple times; added by: filename set by + GatherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_content + added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 236); + text from coderef added by @Basic/MetaYAML (Dist::Zilla::Plugin::Met +aYAML line 78) [DZ] attempt to add LICENSE multiple times; added by: filename set by +GatherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_content +added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 236); +content added by @Basic/License (Dist::Zilla::Plugin::License line 45 +) [DZ] attempt to add README multiple times; added by: filename set by G +atherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_content a +dded by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 236); c +ontent added by @Basic/Readme (Dist::Zilla::Plugaborting; duplicate f +iles would be produced at /usr/local/share/perl5/5.32/Dist/Zilla/App/ +Command/install.pm line 55. in::Readme line 52); content set by Readme (Dist::Zilla::Plugin::Readm +e line 69) [DZ] attempt to add Makefile.PL multiple times; added by: filename set + by GatherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_cont +ent added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 23 +6); content set by MakeMaker (Dist::Zilla::Plugin::MakeMaker line 337 +); content added by @Basic/MakeMaker (Dist::Zilla::Plugin::MakeMaker +line 152) [DZ] attempt to add MANIFEST multiple times; added by: filename set by + GatherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_content + added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 236); + bytes from coderef added by @Basic/Manifest (Dist::Zilla::Plugin::Ma +nifest line 63) -> FAIL Installing . failed. See xxx/.cpanm/work/1640862473.22542/buil +d.log for details. Retry with --force to force install it.

Could the multiple times; be the culprit?

Anyway, if you want to switch to ExtUtils::MakeMaker, then here is a basic Makefile.PL:

use 5.006; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( #EDIT: only for testing #INSTALL_BASE => 'xxx', NAME => 'Graph::Undirected::Hamiltonicity', AUTHOR => q{XXX <XXX@cpan.org>}, VERSION_FROM => 'lib/Graph/Undirected/Hamiltonicity.pm', ABSTRACT_FROM => 'lib/Graph/Undirected/Hamiltonicity.pod', LICENSE => 'artistic_2', PL_FILES => {}, MIN_PERL_VERSION => '5.006', CONFIGURE_REQUIRES => { 'ExtUtils::MakeMaker' => '0', }, BUILD_REQUIRES => { 'Test::More' => '0', }, PREREQ_PM => { # add here dependencies #'ABC' => '1.6', #'Foo::Bar::Module' => '5.0401', }, # it adds your scripts too in bin/ EXE_FILES => [ glob("bin/*.pl") ], dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Graph-Undirected-Hamiltonicity-*.gz' }, );

In order to make a tarball for export to CPAN, then do: perl Makefile.PL && make && make manifest && make test && make dist

Warning: I am seriously cargo-culting with the above so there can well be a better/safer way.

bw, bliako

Replies are listed 'Best First'.
Re^2: Releasing a CPAN module using Dist::Zilla & perlbrew
by perlfan (Vicar) on Dec 30, 2021 at 21:10 UTC
    I've received substantial help at irc.perl.org in the #distzilla channel. Not gonna lie, I treat dzil shamefully as a fat kid treats his 500 snicker bar strong candy stash. It really makes distributing to CPAN a breeze, but I always feel disgusted with myself after doing anything that is not "textbook". Then there's the "be like whomever author specific" minting bundles shitting up CPAN. Don't get me started. Need to go shower now. lol

      hehehe (and i am dzil-neutral).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found