This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f3847fcb949df8db738d71dff026d742cac8552e commit f3847fcb949df8db738d71dff026d742cac8552e Author: Guillem Jover <[email protected]> AuthorDate: Tue Feb 21 00:01:39 2023 +0100 Dpkg::Control::FieldsCore: Deprecate implicit field_transfer_single() argument The usage pattern for this is very non-intuitive on the call sites. Emit a deprecation warning, to warn any potential external users. And after a bit this support will be removed. --- scripts/Dpkg/Control/FieldsCore.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm index 1d11a8fcb..32f2c1041 100644 --- a/scripts/Dpkg/Control/FieldsCore.pm +++ b/scripts/Dpkg/Control/FieldsCore.pm @@ -27,7 +27,7 @@ CTRL_* constants exported by Dpkg::Control. =cut -package Dpkg::Control::FieldsCore 1.01; +package Dpkg::Control::FieldsCore 1.02; use strict; use warnings; @@ -1114,7 +1114,12 @@ added to $to otherwise. sub field_transfer_single($$;$) { my ($from, $to, $field) = @_; - $field //= $_; + if (not defined $field) { + warnings::warnif('deprecated', + 'using Dpkg::Control::Fields::field_transfer_single() with an ' . + 'an implicit field argument is deprecated'); + $field = $_; + } my ($from_type, $to_type) = ($from->get_type(), $to->get_type()); $field = field_capitalize($field); @@ -1365,6 +1370,10 @@ sub field_insert_before($$@) { =head1 CHANGES +=head2 Version 1.02 (dpkg 1.22.0) + +Deprecate argument: field_transfer_single() implicit argument usage. + =head2 Version 1.01 (dpkg 1.21.0) New function: field_parse_binary_source(). -- Dpkg.Org's dpkg

