Commit 2dcadc8c authored by Dominic Hargreaves's avatar Dominic Hargreaves

Point users to Debian packages of deprecated core modules

Bug-Debian: http://bugs.debian.org/747628
Patch-Name: debian/deprecate-with-apt.diff
parent 72f6e23c
......@@ -7,6 +7,16 @@ our $VERSION = 0.03;
our %Config;
unless (%Config) { require Config; *Config = \%Config::Config; }
# Debian-specific change: recommend the separate Debian packages of
# deprecated modules where available
our %DEBIAN_PACKAGES = (
'B::Debug' => 'libb-debug-perl',
'Locale::Codes' => 'liblocale-codes-perl',
'Locale::Country' => 'liblocale-codes-perl',
'Locale::Language' => 'liblocale-codes-perl',
);
# This isn't a public API. It's internal to code maintained by the perl-porters
# If you would like it to be a public API, please send a patch with
# documentation and tests. Until then, it may change without warning.
......@@ -58,9 +68,15 @@ EOM
if (defined $callers_bitmask
&& (vec($callers_bitmask, $warnings::Offsets{deprecated}, 1)
|| vec($callers_bitmask, $warnings::Offsets{all}, 1))) {
warn <<"EOM";
if (my $deb = $DEBIAN_PACKAGES{$package}) {
warn <<"EOM";
$package will be removed from the Perl core distribution in the next major release. Please install the separate $deb package. It is being used at $call_file, line $call_line.
EOM
} else {
warn <<"EOM";
$package will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at $call_file, line $call_line.
EOM
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment