a34d086a24
cpanfile is a format for describing CPAN dependencies for Perl applications. It is more concise - thus easier to read and maintain - than C4::Installer::PerlDependencies, and allows to describe requirements more accurately (using version ranges or features for instance) Additionally it can be read by tools such as cpanm or carton for an easy way to install dependencies on non-Debian-based systems. For more information on cpanfile, see http://search.cpan.org/~miyagawa/Module-CPANfile-1.1002/lib/cpanfile.pod This patch replace C4::Installer::PerlDependencies by an equivalent cpanfile and update all scripts/modules that were using PerlDependencies It also removes dead code from C4::Installer::PerlModules (some subroutines were not used at all, except in unit tests) Added dependencies: - Module::CPANfile - CPAN::Meta (dependency of Module::CPANfile, but we need a more recent version than the one Module::CPANfile requires) Test plan: 1. Go to About page, tab Perl modules and keep this browser tab open 2. Apply patch 3. Install Module::CPANfile and CPAN::Meta a. On Debian-based systems: # will install libcpan-meta-perl as a dependency sudo apt install libmodule-cpanfile-perl b. Others: # will install CPAN::Meta as a dependency sudo cpanm Module::CPANfile 4. In a new browser tab, go to About page, tab Perl modules and compare the table with the one in the previous browser tab They should be identical, except for newly added dependencies (Module::CPANfile and CPAN::Meta) 5. Do a 'standard' install a. perl Makefile.PL (select 'standard') b. make c. sudo make install d. Configure your database, web server, ... and go through the web install process 6. Verify that the cpanfile got copied into PERL_MODULE_DIR (which should be /usr/share/koha/lib) 7. Go to the about page of this fresh install and compare it with your dev install 8. Verify that debian/list-deps still works This takes a lot of time and it may not be necessary to wait until the end. If you see some Debian package names that correspond to modules in cpanfile, it means it still works (you need apt-file for this script to work) 9. Verify that koha_perl_deps.pl still works 10. prove t/Installer_pm.t t/Installer_PerlModules.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 lines
231 B
Perl
Executable file
15 lines
231 B
Perl
Executable file
#!/usr/bin/perl
|
|
#
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Test::More tests => 2;
|
|
use Data::Dumper;
|
|
|
|
BEGIN {
|
|
use_ok('C4::Installer::PerlModules');
|
|
}
|
|
|
|
my $obj = C4::Installer::PerlModules->new;
|
|
|
|
isa_ok($obj,'C4::Installer::PerlModules');
|