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:
- 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.
- 1. Improve tests and release new version of Linux::Distribution.
- 2. Test Linux::APT. Write/submit patches if necessary.
- 3. Install CentOS and Fedora. Write a module for yum interaction
- 4. Write and test an OS-independent module for software package installation (apt and yum)
- 5. CPAN::non - prototype
- 6. CPAN::non - write code
- 7. CPAN::non - test
- 8. CPAN::non - documentation
- 9. Use it in XML::Parser for expat
- 10. Module::Install plugin
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.