$module =~ s{^Sys-Syslog/win32}{Sys-Syslog},
$module =~ s{^Time-Piece/Seconds}{Time/Seconds},
);
- $module =~ s{^vms/ext}{VMS};
$module =~ s{^lib/}{}g;
$module =~ s{/}{::}g;
$module =~ s{-}{::}g;
$lines{$module} = $version;
$module_to_file{$module} = $File::Find::name;
},
- 'vms/ext',
'symbian/ext',
'lib',
'ext',
'dist'
);
--e 'configpm' and $lines{Config} = 'undef';
+-e 'configpm' and $lines{Config} = "$]";
if ( open my $ucdv, "<", "lib/unicore/version" ) {
chomp( my $ucd = <$ucdv> );
close $ucdv;
}
-my $delta_data = make_corelist_delta($perl_vnum, \%lines);
+my $delta_data = make_corelist_delta(
+ $perl_vnum,
+ \%lines,
+ \%Module::CoreList::version
+);
+
my $versions_in_release = " " . $perl_vnum . " => {\n";
$versions_in_release .= " delta_from => $delta_data->{delta_from},\n";
$versions_in_release .= " changed => {\n";
$module_to_deprecated{$module} = 1 if $Modules{$M}{DEPRECATED};
next
if defined $module_to_upstream{$module}
- && $module_to_upstream{$module} =~ /^(?:blead|first-come)$/;
+ && $module_to_upstream{$module} eq 'blead';
my $dist = $modlist{$module};
unless ($dist) {
warn "Can't find a distribution for $module\n";
# Like it or lump it, this has to be Unix format.
my $meta_YAML_path = "authors/id/$dist";
- $meta_YAML_path =~ s/(?:tar\.gz|tar\.bz2|zip|tgz)$/meta/ or die "$meta_YAML_path";
+ $meta_YAML_path =~ s/(?:tar\.gz|tar\.bz2|zip|tgz)$/meta/
+ or die "ERROR: bad meta YAML path: '$meta_YAML_path'";
my $meta_YAML_url = 'http://ftp.funet.fi/pub/CPAN/' . $meta_YAML_path;
if ( -e "$cpan/$meta_YAML_path" ) {
$corelist =~ s/^%upstream .*? ;$/$upstream_stanza/ismx;
# Deprecation generation
-my $deprecated_stanza = " " . $perl_vnum . " => {\n";
-foreach my $module ( sort keys %module_to_deprecated ) {
- my $deprecated = defined $module_to_deprecated{$module} ? "'$module_to_deprecated{$module}'" : 'undef';
- $deprecated_stanza .= sprintf "\t%-24s=> %s,\n", "'$module'", $deprecated;
+{
+ my $delta_data = make_corelist_delta(
+ $perl_vnum,
+ \%module_to_deprecated,
+ do { no warnings 'once'; \%Module::CoreList::deprecated },
+ );
+
+ my $deprecated_stanza = " " . $perl_vnum . " => {\n";
+ $deprecated_stanza .= " delta_from => $delta_data->{delta_from},\n";
+ $deprecated_stanza .= " changed => {\n";
+ foreach my $key (sort keys $delta_data->{changed}) {
+ $deprecated_stanza .= sprintf " %-24s=> %s,\n", "'$key'",
+ defined $delta_data->{changed}{$key} ? "'"
+ . $delta_data->{changed}{$key} . "'" : "undef";
+ }
+ $deprecated_stanza .= " },\n";
+ $deprecated_stanza .= " removed => {\n";
+ for my $key (sort keys($delta_data->{removed} || {})) {
+ $deprecated_stanza .= sprintf " %-24s=> %s,\n", "'$key'", 1;
+ }
+ $deprecated_stanza .= " }\n";
+ $deprecated_stanza .= " },\n";
+
+ $corelist =~ s/^(%deprecated\s*=\s*.*?)(^\);)$/$1$deprecated_stanza$2/xism;
}
-$deprecated_stanza .= " },\n";
-$corelist =~ s/^(%deprecated\s*=\s*.*?)(^\);)$/$1$deprecated_stanza$2/xism;
my $tracker = "%bug_tracker = (\n";
foreach my $module ( sort keys %module_to_upstream ) {
my $upstream = defined $module_to_upstream{$module};
next
- if defined $upstream
- and $upstream eq 'blead' || $upstream eq 'first-come';
+ if defined $upstream and $upstream eq 'blead';
my $bug_tracker;
}
sub make_corelist_delta {
- my($version, $lines) = @_;
+ my($version, $lines, $existing) = @_;
# Trust core perl, if someone does use a weird version number the worst that
# can happen is an extra delta entry for a module.
my %versions = map { $_ => eval $lines->{$_} } keys %$lines;
my %deltas;
# Search for the release with the least amount of changes (this avoids having
# to ask for where this perl was branched from).
- for my $previous(reverse sort keys %Module::CoreList::version) {
+ for my $previous(reverse sort keys %$existing) {
# Shouldn't happen, but ensure we don't load weird data...
next if $previous > $version || $previous == $version && $previous eq $version;
my $delta = $deltas{$previous} = {};
($delta->{changed}, $delta->{removed}) = calculate_delta(
- $Module::CoreList::version{$previous}, \%versions);
+ $existing->{$previous}, \%versions);
}
my $smallest = (sort {
my ($str) = @_;
# There's gotta be something already doing this properly that we could just
# reuse, but I can't quite thing of where to look for it, so I'm gonna do
- # the simplest possible thing that'll allow me to release 5.17.5. --rafl
+ # the simplest possible thing that'll allow me to release 5.17.7. --rafl
$str =~ s/'/\\'/g;
"'${str}'";
}