Change the repository URL to https, bump version, ready to release
[cpan-testers-parsereport.git] / bin / conf2conf.pl
blobe1c22d5cffbdd91cb0428e10e26486c86e703ff8
1 # This functions transforms a CPAN::Testers::ParseReport::parse_single_report ()
2 # old nntp report into new hash structs
4 # my $hash = conf2conf (CPAN::Testers::ParseReport::parse_single_report ({
5 # id => $report }, $dumpvars, %Opt));
7 # For conversions, make sure that $dumpvars is true to get all data
9 # perl -Ilib bin/ctgetreports --cachedir=t/var --local --report=2044631 --dumpvars=.
11 sub conf2conf
13 my $rpt = shift;
14 my %hsh;
15 foreach my $p (qw( conf env meta mod prereq )) {
16 %{$hsh{$p}} = map { $_ => delete $rpt->{"$p:$_"} }
17 grep s/^$p:// => keys %$rpt;
19 $rpt->{PerlMyConfig} = {
20 build => {
21 osname => $hsh{conf}{osname},
22 stamp => 0,
23 opions => {},
24 patches => [],
26 config => $hsh{conf},
27 inc => [],
29 $rpt->{TestEnvironment} = $hsh{env};
30 $rpt->{TestSummary} = $hsh{meta};
31 $rpt->{Prereqs} = $hsh{prereq},
32 $rpt->{InstalledModules} = $hsh{mod};
33 $rpt;
34 } # conf2conf