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=786870e4bb9656b39df2bdeff5cc747e41d734c4 commit 786870e4bb9656b39df2bdeff5cc747e41d734c4 Author: Guillem Jover <[email protected]> AuthorDate: Sat Aug 25 01:28:17 2018 +0200 Dpkg::Control::Fields: Do not use & sigil for function calls Warned-by: perlcritic Fixes: Subroutines::ProhibitAmpersandSigils --- debian/changelog | 1 + scripts/Dpkg/Control/Fields.pm | 9 ++++++--- t/critic.t | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9f5e81dfa..2d9d9e0e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -158,6 +158,7 @@ dpkg (1.19.1) UNRELEASED; urgency=medium patches. - Dpkg::OpenPGP: Return the destination path on successful ASCII armor conversion. + - Dpkg::Control::Fields: Do not use & sigil for function calls. * Documentation: - Update gettext minimal version in README. - Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph. diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index 4a584e413..33beeec56 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -32,11 +32,14 @@ foreach my $op (run_vendor_hook('register-custom-fields')) { next if not (defined $op and ref $op); # Skip when not implemented by vendor my $func = shift @$op; if ($func eq 'register') { - &field_register(@$op); + my ($field, $allowed_type, @opts) = @{$op}; + field_register($field, $allowed_type, @opts); } elsif ($func eq 'insert_before') { - &field_insert_before(@$op); + my ($type, $ref, @fields) = @{$op}; + field_insert_before($type, $ref, @fields); } elsif ($func eq 'insert_after') { - &field_insert_after(@$op); + my ($type, $ref, @fields) = @{$op}; + field_insert_after($type, $ref, @fields); } else { croak "vendor hook register-custom-fields sent bad data: @$op"; } diff --git a/t/critic.t b/t/critic.t index 0221c1b22..acb841f38 100644 --- a/t/critic.t +++ b/t/critic.t @@ -79,6 +79,7 @@ my @policies = qw( RegularExpressions::ProhibitUselessTopic RegularExpressions::RequireBracesForMultiline RegularExpressions::RequireExtendedFormatting + Subroutines::ProhibitAmpersandSigils Subroutines::ProhibitExplicitReturnUndef Subroutines::ProhibitManyArgs Subroutines::ProhibitNestedSubs -- Dpkg.Org's dpkg

