Alexandr Ciornii (CHORNY)
- Amount Requested:
Many CPAN modules depend on non-CPAN libraries (or programs). Installation of such module requires that library be installed before installing CPAN module. For beginners it is more confusing as library may be installed, but its headers may not. I'd like to automate this step and install corresponding Linux package as part of module install.
Currently main module of this project has codename CPAN::non, it will be renamed later after discussion in module-authors mailing list.
Benefits to the Perl Community
For any user installing CPAN modules, as it will become much simpler. It is especially important when installing many modules or in case of inexpirienced user.
Module authors, because module installation will become easier and they would not need to periodically explain that users need to install non-CPAN library.
CPAN/OS porters, because dependencies will be listed more clearly, in future it may be also automated.
Package tools like Shipwright or carton can use CPAN::non to install OS packages.
Deliverables (to CPAN)
New version of Linux::Distribution. XML::Parser will automatically install expat (of course if user agrees). Module for yum interaction. CPAN::non and Module::Install plugin will be released.
CPAN modules that want to get rid of this problem usually bundle libraries either directly or as Alien:: CPAN distributions. This creates several problems:
- More work for authors and OS package maintainers
- Necessity to update library if serious problem is found
- Necessity to replicate additional patches for every OS
But it is easy to install such dependency with OS tools. CPAN module will have configuration file that will specify build and runtime dependencies. CPAN::non will be bundled with module, or installed using configure_requires in META.yml/json. In future OS vendors may include it into their versions of Perl.
CPAN::non will detect version of Linux, check if dependency and its headers are installed, find out which name has dependency and headers on this OS from configuration file, install it.
For yum there is no module CPAN, I plan to write module for it. Also there is no general module that would be dist-neutral, so I will write it too.
Module::Install plugin will be convenient as Module::Install allows automating bundling of run-time dependencies.
XML::Parser will be used as a first test for CPAN::non as I have comaint rights for it.
- Improve tests and release new version of Linux::Distribution.
- Test Linux::APT. Write/submit patches if necessary.
- Install CentOS and Fedora. Write a module for yum interaction
- Write and test an OS-independent module for software package installation (apt and yum)
- CPAN::non - prototype
- CPAN::non - write code
- CPAN::non - test
- CPAN::non - documentation
- Use it in XML::Parser for expat
- Module::Install plugin
- Blog about it, help CPAN authors use it, improve main module if necessary
The project will take 2-3 months. I will start right after grant approval.
New versions of Linux::Distribution and XML::Parser.
CPAN::non, Module::Install plugin and module for yum released.
This project is a working solution, but after it will be adopted, more interesting things may be implemented, like support for FreeBSD, even Windows, support in tools for OS package generation, etc.
I maintain many CPAN modules and fixed bugs in many more. Participated in such projects as Strawberry Perl, Padre, ExtUtils::MakeMaker and others. Contributed to Module::Install. My CPAN account: http://search.cpan.org/~chorny/ and Ohloh: https://www.ohloh.net/accounts/chorny/positions.
For 9 years I was a lead programmer of credit card payment system InterCardPro. Currently work for kariera.md.