diff options
author | Guillem Jover <guillem@debian.org> | 2019-11-16 00:40:03 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-11-26 02:42:45 +0100 |
commit | a376ff0b20918ec4c66a6905529065d992095c35 (patch) | |
tree | 6aec756397b4023cd2f4eb0adf46cbd8b2125b4f | |
parent | 83b1500011a0656263afbdeffffca182758ef061 (diff) | |
download | dpkg-a376ff0b20918ec4c66a6905529065d992095c35.tar.gz |
Dpkg::Conf: Remove obsolete methods and obsolete croak for method option
We do not bump the module version to 2.00, as these functions and option
have croak'ed almost since their introduction.
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | scripts/Dpkg/Conf.pm | 26 |
2 files changed, 8 insertions, 19 deletions
diff --git a/debian/changelog b/debian/changelog index 7a9dd2981..d481e4b1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -68,6 +68,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - Dpkg::Version: Remove deprecation warning from semantic change in bool overload. - Dpkg::Checksums: Remove obsolete 'program' property warning. + - Dpkg::Conf: Remove obsolete methods and obsolete croak for method option. * Documentation: - man: Fix uncommon wording constructs. - man: Use a minus sign for a literal string. diff --git a/scripts/Dpkg/Conf.pm b/scripts/Dpkg/Conf.pm index 5b98bbd8e..028a2939f 100644 --- a/scripts/Dpkg/Conf.pm +++ b/scripts/Dpkg/Conf.pm @@ -18,7 +18,7 @@ package Dpkg::Conf; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '1.04'; use Carp; @@ -85,22 +85,6 @@ sub get_options { return @{$self->{options}}; } -=item get() - -=item set() - -Obsolete functions, use get_options() instead. They will croak. - -=cut - -sub get { - croak 'obsolete function, use get_options instead'; -} - -sub set { - croak 'obsolete function, use get_options instead'; -} - =item $conf->load($file) Read options from a file. Return the number of options parsed. @@ -215,8 +199,6 @@ sub filter { my $remove = $opts{remove} // sub { 0 }; my $keep = $opts{keep} // sub { 1 }; - croak 'obsolete option format_argv' if exists $opts{format_argv}; - @{$self->{options}} = grep { not $remove->($_) and $keep->($_) } @{$self->{options}}; } @@ -253,6 +235,12 @@ Save the options in a file. =head1 CHANGES +=head2 Version 1.04 (dpkg 1.20.0) + +Remove croak: For 'format_argv' in $conf->filter(). + +Remove methods: $conf->get(), $conf->set(). + =head2 Version 1.03 (dpkg 1.18.8) Obsolete option: 'format_argv' in $conf->filter(). |