From 88becea6544036871ae71db29730dc4cb20dfafa Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 26 Oct 2017 16:24:27 +0000 Subject: [PATCH] Bug 19735: Script to generate cpanfile (DO NOT PUSH) For testing purposes only --- misc/devel/generate_cpanfile.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 misc/devel/generate_cpanfile.pl diff --git a/misc/devel/generate_cpanfile.pl b/misc/devel/generate_cpanfile.pl new file mode 100755 index 0000000000..2a90334b30 --- /dev/null +++ b/misc/devel/generate_cpanfile.pl @@ -0,0 +1,21 @@ +#!/usr/bin/env perl + +use Modern::Perl; + +use Module::CPANfile; + +use C4::Installer::PerlDependencies; + +my $deps = $C4::Installer::PerlDependencies::PERL_DEPS; +my $prereqs = {}; +while (my ($module, $req) = each %$deps) { + my $type = $req->{required} ? 'requires' : 'recommends'; + + $prereqs->{runtime}->{$type}->{$module} = $req->{min_ver}; +} + +$prereqs->{runtime}->{requires}->{'Module::CPANfile'} = '1.1000'; +$prereqs->{runtime}->{requires}->{'CPAN::Meta'} = '2.150006'; + +my $cpanfile = Module::CPANfile->from_prereqs($prereqs); +print $cpanfile->to_string; -- 2.14.2