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

I've just recently started learning perl and want to make a distribution of a perl script I've written but when I run "perl Makefile.PL" it makes the Makefile but doesn't tarball the distribution .....

My Makefile.PL looks like this :

# # Makefile.PL for script "if_archive" # # Filename : Makefile.PL # Created : 18 March 2003 # use ExtUtils::MakeMaker; &WriteMakefile( NAME => 'if_archive', EXE_FILES => [ 'if_archive.pl' ], DISTNAME => 'if_archive', VERSION_FROM => 'if_archive.pl', PREREQ_PM => { 'Class::Date' => 0, 'Archive::Tar' => 0, 'MIME::Lite' => 0, }, dist => {COMPRESS => 'gzip', SUFFIX => 'gz'}, );
can anyone point me in the right direction or a URL that can ?

Thanks

Edit by tye, title, P tags

Replies are listed 'Best First'.
Re: "perl Makefile.PL" does not create tarball?
by jasonk (Parson) on Mar 20, 2003 at 17:42 UTC

    perl Makefile.PL just creates the Makefile for you, but that Makefile contains targets you can use to create distributions. Some of those targets include:

    • tardist - make a .tar.gz
    • zipdist - make a .zip
    • uutardist - make a uuencoded .tar
    • shdist - make a self-extracting shell archive

    So make tardist will give you a .tar.gz as you expect (or just make dist, as tardist is the default dist).


    We're not surrounded, we're in a target-rich environment!
Re: Newbie Question : Makefile.PL
by adrianh (Chancellor) on Mar 20, 2003 at 16:30 UTC

    If you're on a Unix box typing make dist once you have a Makefile should get you a gzipped tar ball.

    Take a look at ExtUtils::MakeMaker for full details, especially the section on "Distribution Support".