in reply to How to create and name module tarball for CPAN

If you are using ExtUtils::MakeMaker in your Makefile.PL, you can create the dist tarball by the following commands:

perl Makefile.PL make make dist

For uploading to CPAN, I've automated that step through CPAN::Uploader or CPAN::Upload::Tiny (I don't remember which one).

Replies are listed 'Best First'.
Re^2: How to create and name module tarball for CPAN
by hippo (Archbishop) on Nov 28, 2023 at 09:35 UTC
    make dist

    Absolutely this. However, it does require the author to have constructed the source tree and the Makefile.PL correctly in the first place and the OP doesn't entirely convince that this is the case.


    🦛

      Ooh, indeed! This is another chance for me to plug my Dist-Template repository. I just copy the contents of the subfolder template/ into the root of my distribution directory and then have Makefile.PL als my build tool for the distribution.

      Other starters are h2xs, Module::Starter, Dist::Inktly::Minty, but I've only used h2xs and then started copying old distribution skeletons into new distributions...

        I can't mention Minilla often enough. It does everything from new dist creation to uploading to PAUSE. Updates version numbers, tags stable releases in git, can generate a readme.md for github, supports the 3 most popular back ends for dist installation, creates a basic CI workflow to get folks started using GH Actions, can generate pure perl and XS based modules, generates author's test such as running spelcheck on your POD as required, etc. It should be the modern 'best practices' way to get new people releasing modules quickly.