Line 0
Link Here
|
0 |
- |
1 |
#!/usr/bin/env perl |
|
|
2 |
|
3 |
use Modern::Perl; |
4 |
|
5 |
use Module::CPANfile; |
6 |
|
7 |
use C4::Installer::PerlDependencies; |
8 |
|
9 |
my $deps = $C4::Installer::PerlDependencies::PERL_DEPS; |
10 |
my $prereqs = {}; |
11 |
while (my ($module, $req) = each %$deps) { |
12 |
my $type = $req->{required} ? 'requires' : 'recommends'; |
13 |
|
14 |
$prereqs->{runtime}->{$type}->{$module} = $req->{min_ver}; |
15 |
} |
16 |
|
17 |
$prereqs->{runtime}->{requires}->{'Module::CPANfile'} = '1.1000'; |
18 |
$prereqs->{runtime}->{requires}->{'CPAN::Meta'} = '2.150006'; |
19 |
|
20 |
my $cpanfile = Module::CPANfile->from_prereqs($prereqs); |
21 |
print $cpanfile->to_string; |