diff options
author | Guillem Jover <guillem@debian.org> | 2019-08-10 02:51:10 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-11-26 02:42:44 +0100 |
commit | 9b0dc0a1a879d35443781058415550059db1589c (patch) | |
tree | db917b1521dcdadaf34caea6882e42011ad8b2ee | |
parent | 895a2e525adfd90a57e1e4dfbcc18bb0c1ca64b4 (diff) | |
download | dpkg-9b0dc0a1a879d35443781058415550059db1589c.tar.gz |
Dpkg::Changelog::Entry::Debian: Remove obsolete methods and hide variables
Remove obsolete methods check_header() and check_trailer(). Hide internal
lowercase variables $regex_header and $regex_trailer.
Bump module version to 2.00.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Changelog/Entry/Debian.pm | 49 |
2 files changed, 11 insertions, 40 deletions
diff --git a/debian/changelog b/debian/changelog index 5c37bcb23..fdb702b5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -49,6 +49,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - Dpkg: Remove internal lowercase variables $version, $progname, $admindir, $dpkglibdir and $pkgdatadir. - Dpkg::Changelog: Remove obsolete methods dpkg() and rfc822(). + - Dpkg::Changelog::Entry::Debian: Remove obsolete methods check_header() + and check_trailer(). Hide variables $regex_header and $regex_trailer. * Documentation: - man: Fix uncommon wording constructs. - man: Use a minus sign for a literal string. diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm index 5f4c9e569..2d1c4e6a1 100644 --- a/scripts/Dpkg/Changelog/Entry/Debian.pm +++ b/scripts/Dpkg/Changelog/Entry/Debian.pm @@ -19,10 +19,8 @@ package Dpkg::Changelog::Entry::Debian; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT_OK = qw( - $regex_header - $regex_trailer match_header match_trailer find_closes @@ -55,12 +53,9 @@ implementation are described below. my $name_chars = qr/[-+0-9a-z.]/i; -# XXX: Backwards compatibility, stop exporting on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) - # The matched content is the source package name ($1), the version ($2), # the target distributions ($3) and the options on the rest of the line ($4). -our $regex_header = qr{ +my $regex_header = qr{ ^ (\w$name_chars*) # Package name \ \(([^\(\) \t]+)\) # Package version @@ -73,7 +68,7 @@ our $regex_header = qr{ # The matched content is the maintainer name ($1), its email ($2), # some blanks ($3) and the timestamp ($4), which is decomposed into # day of week ($6), date-time ($7) and this into month name ($8). -our $regex_trailer = qr< +my $regex_trailer = qr< ^ \ \-\- # Trailer marker \ (.*) # Maintainer name @@ -100,8 +95,6 @@ my %month_name = map { $_ => } qw( August September October November December ); -## use critic - =head1 METHODS =over 4 @@ -245,36 +238,6 @@ sub parse_trailer { return @errors; } -=item $entry->check_header() - -Obsolete method. Use parse_header() instead. - -=cut - -sub check_header { - my $self = shift; - - warnings::warnif('deprecated', - 'obsolete check_header(), use parse_header() instead'); - - return $self->parse_header(); -} - -=item $entry->check_trailer() - -Obsolete method. Use parse_trailer() instead. - -=cut - -sub check_trailer { - my $self = shift; - - warnings::warnif('deprecated', - 'obsolete check_trailer(), use parse_trailer() instead'); - - return $self->parse_header(); -} - =item $entry->normalize() Normalize the content. Strip whitespaces at end of lines, use a single @@ -465,6 +428,12 @@ sub find_closes { =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Remove methods: $entry->check_header(), $entry->check_trailer(). + +Hide variables: $regex_header, $regex_trailer. + =head2 Version 1.03 (dpkg 1.18.8) New methods: $entry->get_timepiece(). |