This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=76daf7b7dd594d720f81fa32fbf3e19c1fb9e5ff commit 76daf7b7dd594d720f81fa32fbf3e19c1fb9e5ff Author: Guillem Jover <[email protected]> AuthorDate: Tue Jun 5 05:25:58 2018 +0200 Dpkg::Version: Bump VERSION and improve semantic change description Give context to the warning message, otherwise it's not clear what is going on. If the users to not conditionalize the warning usage they will get a perl warning about the unknown warning category itself, bump the module version to be able to discern this change, and update documentation to reflect this. --- scripts/Dpkg/Version.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm index a06ba268d..2900e5790 100644 --- a/scripts/Dpkg/Version.pm +++ b/scripts/Dpkg/Version.pm @@ -22,7 +22,7 @@ use strict; use warnings; use warnings::register qw(semantic_change::overload::bool); -our $VERSION = '1.01'; +our $VERSION = '1.02'; our @EXPORT = qw( version_compare version_compare_relation @@ -58,8 +58,8 @@ use overload '""' => sub { return $_[0]->as_string(); }, 'bool' => sub { warnings::warnif('Dpkg::Version::semantic_change::overload::bool', - 'bool overload behavior has changed back to be ' . - 'an is_valid() alias'); + 'Dpkg::Version bool overload behavior has changed ' . + 'back to be an is_valid() alias'); return $_[0]->is_valid(); }, 'fallback' => 1; @@ -136,7 +136,11 @@ $v->as_string() if $v->is_valid(), a breaking change in behavior that caused that relied on those semantics, this overload will emit a warning with category "Dpkg::Version::semantic_change::overload::bool" until dpkg 1.20.x. Once fixed, or for already valid code the warning can be quiesced with -C<no warnings qw(Dpkg::Version::semantic_change::overload::bool)>. + + no if $Dpkg::Version::VERSION ge '1.02', + warnings => qw(Dpkg::Version::semantic_change::overload::bool); + +added after the C<use Dpkg::Version>. =item $v->is_valid() @@ -469,6 +473,10 @@ sub version_check($) { =head1 CHANGES +=head2 Version 1.02 (dpkg 1.19.1) + +Semantic change: bool evaluation semantics restored to their original behavior. + =head2 Version 1.01 (dpkg 1.17.0) New argument: Accept an options argument in $v->as_string(). -- Dpkg.Org's dpkg

