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

Hello,
 
I am posting here as a last resort after exhausting the available documentation on Packaging up a Module for distribution.
 
I know how h2xs -AX -n ModuleName is used, for packaging _A_ module. (One module). I can't find ANY examples covering packaging up a complete program.
 
I have a perl script that uses a number of modules that I've created. How do I set it up so that when doing the 'perl Makefile.pl', 'make', 'make test', 'make install', I am usuing all of these modules, and the actually script that I want people to use.
 
Can someone post a complete example using more that one module with a primary executable script all one happy package OR explain to me the "correct" way to think about this type of a situation.
 
Exscuse me if I am being vague, but the subject that I am covering is very general and I haven't been able to find any documented examples to better clear up my misunderstandings.
 
Thanks in advance.

Replies are listed 'Best First'.
Re: Packaging Up a Complete Perl Program
by btrott (Parson) on Mar 14, 2001 at 06:36 UTC
    Generally you just arrange your modules under a 'lib' hierarchy in your distribution directory, and place any executables into a 'bin' directory. Then, in your MakeMaker options, use the EXE_FILES key, like:
    'EXE_FILES' => [ 'bin/foo', 'bin/bar' ],
    Take a look at the Template Toolkit distribution for an example of a distribution with both executables and library modules.
Re: Packaging Up a Complete Perl Program
by jmcnamara (Monsignor) on Mar 14, 2001 at 13:37 UTC
    The first thing to do is to make sure that all the files that you want packaged are listed in the Manifest file.
    Then you can use make to create a distro as follows:
    perl Makefile.PL make make dist
    If you have tar and gzip in your path you will end up with a file like this: My-Package-version.tar.gz.

    Also, have a look at the manpage for ExtUtils::MakeMaker, there are some other interesting make options for distributions including the all important distcheck.

    John.
    --
    "Language is a virus from outer space" - William S. Burroughs