Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Recently I got a bug message from someone who told me that I should use 'make dist' for future module distributions. Unfortunately my linux box was down and all I had was my win box, which didn't have make on it. So I just tarred and gzipped the module distribution before uploading it. Things seem fine. My module passed the cpan test.

I looked on page 162 of randal's new alpaca book in which he discussed 'make dist', and while it looks very useful, I don't see how just tarring and gzipping the distribution can cause things to go wrong. Am I missing anything? Why would this (anonymous) person complain?

update (broquaint): dropped the (OT) from the title

Replies are listed 'Best First'.
Re: make dist
by PodMaster (Abbot) on Jul 17, 2003 at 21:09 UTC
    Perhaps because that's how you make new distributions, `perldoc perlnewmod':
    perl Makefile.PL; make test; make dist

    Once again, h2xs has done all the work for you. It produces the standard Makefile.PL you'll have seen when you downloaded and installs modules, and this produces a Makefile with a dist target. Once you've ensured that your module passes its own tests - always a good thing to make sure - you can make dist, and the Makefile will hopefully produce you a nice tarball of your module, ready for upload.

    make dist does nice things like checking only the stuff in your manifest gets put in the tarball, and makes the tarball come in a predictable format. Here's an example
    PPM-Repositories-0.02>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for PPM::Repositories PPM-Repositories-0.02>nmake dist Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. C:\Perl\bin\perl.exe -MExtUtils::Command -e rm_rf PPM-Reposito +ries-0.02 C:\Perl\bin\perl.exe "-MExtUtils::Manifest=manicopy,maniread" + -e "manicopy(maniread(),'PPM-Repositories-0.02', 'best');" mkdir PPM-Repositories-0.02 tar cvf PPM-Repositories-0.02.tar PPM-Repositories-0.02 PPM-Repositories-0.02/ PPM-Repositories-0.02/Changes PPM-Repositories-0.02/Makefile.PL PPM-Repositories-0.02/MANIFEST PPM-Repositories-0.02/MANIFEST.SKIP PPM-Repositories-0.02/META.yml PPM-Repositories-0.02/README PPM-Repositories-0.02/Repositories.pm PPM-Repositories-0.02/test.pl C:\Perl\bin\perl.exe -MExtUtils::Command -e rm_rf PPM-Reposito +ries-0.02 gzip --best PPM-Repositories-0.02.tar PPM-Repositories-0.02>rm Changes PPM-Repositories-0.02>nmake dist Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. C:\Perl\bin\perl.exe -MExtUtils::Command -e rm_rf PPM-Reposito +ries-0.02 C:\Perl\bin\perl.exe "-MExtUtils::Manifest=manicopy,maniread" + -e "manicopy(maniread(),'PPM-Repositories-0.02', 'best');" mkdir PPM-Repositories-0.02 -e: Changes not found at -e line 1 Can't read Changes: No such file or directory NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2' Stop.
    See how it creates a folder called Distribution-Name-Version and stuff everything in there? Links: PS -- If you're wondering how I got rm, GnuWin32 and CygWin

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I'll reply here instead of ammending my original node. I do make distclean before I manually make my tarball. This does the MANIFEST check as well (helas it doesn't remove emacs backup files).

      --
      I'm not belgian but I play one on TV.

Re: make dist
by belg4mit (Prior) on Jul 17, 2003 at 20:29 UTC
    First, I wouldn't really consider this OT ;-) Second, I honestly don't know. I've always done a manual tar -zcvf, although I've known about make dist. Did they not provide, or were you unable to solicit further details? Lastly, I found out in the CB yesetrday that Micrsoft makes nmake available on their FTP server.

    --
    I'm not belgian but I play one on TV.

      First, I wouldn't really consider this OT ;-)

      Neither would I. In the past, I have posted similiar messages about cpan or other perl-related topics and I would always get considered by some zealous monk. I guess I am kinda shaken up by the whole considered experience. It's the same feeling of dread when I post code here that doesn't use warnings or strict. I know the code police will yell at me. Hmmm.... Perhaps we can call it Post (on PM) Traumatic Syndrome. :)