Blog entries
2008 Apr 03

Strawberry Perl for Windows.
2008 Apr 01

Oslo Hackathon day -4.
2008 Mar 28

Blogging about Perl outside the community?.
2008 Mar 27

OSCON Proposals rejected.
2008 Mar 26

Preparing for the QA Hackathon in Oslo.
2008 Mar 25

Missing licenses on CPAN modules?.
2008 Mar 24

License of Perl Modules on CPAN.
2007 Dec 24

Joining Technorati?.
2007 Dec 24

Regular Expressions in Perl 5.10.
2007 Dec 24

Switching in Perl 5.10.
2007 Dec 24

Smart Matching in Perl 5.10.
2007 Dec 24

What's new in Perl 5.10? say, //, state.
2007 Dec 23

The Zulo interview was published.
2007 Dec 08

Frequency of programming languages on LinkedIn.
2007 Dec 06

Interview in Zulo.
2007 Dec 06

Sun Startup Essentials Launch.
2007 Aug 25

Testing PostgresSQL.
2007 Aug 25

Testing Pugs and Perl 6.
2007 Aug 22

Testing Ruby.
2007 Aug 22

Testing GHC, the Glasgow Haskell Compiler.
2007 Aug 22

Testing NUT, the Network UPS Tools.
2007 Aug 21

Testing SQLite .
2007 Aug 20

Smoked Parrot.
2007 Aug 20

Quality Assurance of Perl 5.
2007 Jul 09

Using mod_perl for szabgab.com.
2007 Jul 07

Quality Assurance and Automated Testing in Open Source Software.
2007 Jul 07

Add tags to CPAN modules via CPAN::Forum .
2007 Jun 15

Windows on VMware.
2007 Jun 13

Reducing the social gap of the information age.
2007 May 25

Moving to a new server.
2007 May 04

Preparing an application for distribution.
2007 May 01

Spreadsheet::ParseExcel is looking for a maintainer.
2007 Apr 28

CPAN Modules in Linux Distributions.
2007 Apr 18

Version control of single files using Subversion.
2007 Apr 13

Testing results, Perl and CPAN module availability.
2006 Aug 05

Perltraining.org split into two.
2006 Jul 23

Upgrading Ubuntu to 6.06, (Dapper Drake).
2006 Jul 22

Ginger Spam Salad.
2006 Jul 20

Automating the blog.
2006 Jul 19

Wish list: search engine for Perl related sites.
2006 Jul 19

Perltraining.org .
2006 Jul 19

More blog related issues.
2006 Jul 19

Starting a blog.

 

home | blog

Preparing an application for distribution

To distribute an application written in Perl we have to make sure we can easily distribute its dependencies. There might be dependencies outside of CPAN but my focus now is the list of modules one requires from CPAN.

There are several issues we need to address:

  1. Do all the prerequisites work on all the platforms we would like to support?
  2. For easy distribution, we might want them to be actually available on those platforms in the packaging system of the platform.
    Relying on the native packaging systems makes external non-CPAN dependencies also easier to handle.
  3. We have to make sure we adhere to the licence requirements of all the modules
  4. In order to ensure high quality we might want to pick a certain version of each module. We might even want to get a report of the various Kwalitee metrics from CPANTS.

Given an application it would be nice to be able to automatically generate a report with all this information.

  1. First of all we need to find out all our prerequisites. We might know our immediate prerequisites, the modules we use but they might also depend on other modules and this way we might end up with a list a lot longer than what we have direct knowledge about.
    There are several modules on CPAN that might be useful for this task. I saw [dist://Module-Dependency], Devel::Dependencies, CPAN::Unwind which uses Module::Depends::Intrusive. PAR has a script called scandeps.pl to do this.
  2. To see if our application works on a certain platform we will have to run our own unit tests there but before doing that we might wand to see if all our prereqs already work there.
    Especially if we don't have direct access to all the platforms.
    As a minimum we have to see if there is at least one passing test report on the CPAN Testers site for each module on the given platform.
    That site has an SQLite database that can be downloaded and queried for the relevant information.
  3. It might be easier to package our application with the standard packaging system of each platform (e.g. rpm, deb, etc...).
    If we plan to do so we should make sure all our prerequisites are available in a packaged version on the specific platforms.
    This information can be partially collected using Module::Packaged.
    That module still needs more work to include further linux distributions and have it more fine grained in relation to the versions of the various distributions.
    The HTML report I created recently can provide some insight without installing the module.
  4. Most of the modules on CPAN are under the "perl license" that is GPL or Artistic but there are exceptions. For example DBD::SQLite also includes software that is in the Public domain, Compress::Zlib contains the source code of Zlib and Spreadsheet::ParsExcel::Simple is GPL only. There might be all kind of other licenses too.
    These issues need to be addressed by the legal department of each organization.
    First we need to collect the licencing information of each module. Some of them already provide their own license information in the META.yml file but most of them (as of late 2006 about 90% of them) still don't have this information available. Module::License::Report can be of help here as it analysis the files in the distribution in addition to checking the Meta.yml file.
    This still does not address the license of the additional code in the modules. I think currently there is no way to automatically collect this information.

So definitely there is some work to do in order to have such a tool. The tasks I see

  1. Add more distros to Module::Packaged and provide it for various versions of each distro.
  2. Download the database from CPANTS and assuming we have a list of modules list all the prereqs modules and all the licensing information.
  3. Integrate with one of the tools that given a script can tell which modules is it using.

Last Update: Tue Sep 25 17:06:26 2007