views:

107

answers:

2

I've written any number of perl modules in the past, and more than a few stand-alone perl programs, but I've never released a multi-file perl program into the wild before.

I have a perl program that is almost at the beta stage and is going to be released open source. It requires a number of data files, as well as some external perl modules -- some I've written myself, and some from CPAN -- that I'll have to bundle with it so as to ensure that someone can just download my program and install it without worrying about hunting for obscure modules.

So, it sounds to me like I need to write an installer to copy all the files to standard locations so that a user can easily install everything. The trouble is, I have no idea what the standard practice would be for this. I have found lots of tutorials on perl module standards, but none on perl program standards.

Does anyone have any pointers to standard paths, installation proceedures, etc, for perl programs? This is going to be complicated by the fact that the program is multi-platform. I've been testing it in Linux, but its designed to work equally well in Windows.

+5  A: 

Take a look at PAR and PAR::Packer. You can bundle all of your requirements (even non-Perl requirements) into one file. With PAR::Packer, the user doesn't even need to have Perl installed for it to work.

You might also look at how the various App::* distributions are setup.

Chas. Owens
+4  A: 

The standard installers for modules (ExtUtils::MakeMaker, Module::Build, Module::Install) also work the same way for scripts. Using such a standard Perl tool will help you to:

  • distribute your application on the CPAN (and you'll benefit from automated tests on various platforms by CPAN Testers), and so your app will be installable (with all its dependencies) from the CPAN shell

  • help packagers of Linux/BSD distributions to make packages for your product

dolmen
Also Dist::Zilla, which many module maintainers are moving to now.
Ether