Is there a standard or best practice for Perl programs, unlike Perl modules?

I wrote any number of perl modules in the past and more than a few standalone perl programs, but I had never released a multiprocessor perl program in the wild before.

I have a perl program that is almost in beta and will be released open source. This requires several data files, as well as some external perl modules - some of them I wrote myself, and some of CPAN - that I will have to bind to it to make sure that someone can just download my program and install it, not worrying about finding obscure modules.

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

Does anyone have pointers to standard paths, settings, etc. for perl programs? This is complicated by the fact that the program is multi-platform. I tested it on Linux, but it worked just as well on Windows.

+4
source share
2 answers

Standard installers for modules (ExtUtils :: MakeMaker, Module :: Build, Module :: Install) also work the same for scripts. Using this standard Perl tool will help you:

  • apply for CPAN (and you will benefit from automated tests on various platforms from CPAN Testers), and therefore your application will be installed (with all its dependencies) from the CPAN shell

  • help Linux / BSD distribution packers create packages for your product

+4
source

Take a look at PAR and PAR :: Packer . You can combine all your requirements (not even Perl requirements) into one file. With PAR :: Packer, the user does not even need to install Perl to work.

You can also see how the various App :: * distributions are configured.

+5
source

Source: https://habr.com/ru/post/1312036/


All Articles