Distributing applications via CPAN
CPAN is a very good system to distribute libraries we call packages or modules. What about applications? There is a section on CPAN that was supposed to distribute scripts but it never took off. Is CPAN ready to be used to distribute applications? If not, what is missing?
PadreFor Padre, which is a desktop application, we use CPAN as our primary way of distributing the source code. You can install it by just typing
cpan PadreThat's OK, but we also know that in order to provide a better user experience and to have better control on what is used in the application we need to distribute a packaged version of it, batteries inside, in binary format. That's why we have the various stand-alone versions of Padre, that's why we ask the downstream Linux/BSD distributions to include it and that's why Padre is going to be part of Strawberry Perl Professional for Windows
I think in Padre we solved the installation of the the non-code files fairly well by installing everything in the share/ directory (we use Module::Install and call install_share; or actually nowadays we call install_share_with_mofiles;) and then accessing those files using
my $share_dir = File::ShareDir::dist_dir('Padre');
AckHow is it done in other applications?
Ack is another (command line) application on CPAN, albeit a very small one. It is built from a small script and a few modules. People can install it directly from CPAN but for better user experience Andy is also packaging it as a stand alone script. For this he takes the modules and includes them inline the script. That way people can download a single script from the web site and move it around in the office and the only thing they need is a "recent" version of perl. (5.6.1)
What about web applications?
KwikiA quick search on CPAN led me to Kwiki which have not seen a release in 3 years and its documentation contains this friendly message: Don't install this CPAN module!. The old code was installing everything via CPAN and then you were supposed to run a command line script to generate an instance of the application.
CatalystWhile it is a framework and not an application, we can also look at Catalyst. It is being installed in a similar manner. You install it via CPAN and then you run a command line script to create a directory structure for your application. This structure resembles a standard CPAN distribution that allows the easy generation of a tarball. As far as I understand the way to install that application is to unzip the tarball and setup Apache. As far as I understand it cannot be installed using CPAN.pm.
Others?What other applications are on CPAN and what is their strategy of packaging and installation? What other services does the CPAN ecosystem need to provide in order to make it easier to distribute and install applications through its pipes?
BTW Funnily each one of these applications have their own web site.