From 14b92d54d044fc9b932997869107a1ae02a1a60f Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 30 Dec 2012 03:08:21 +0100 Subject: scripts: Do not use sort directly on the return keyword Fixes Subroutines::ProhibitReturnSort. Warned-by: perlcritic --- scripts/Dpkg/Control/Fields.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index 56ae2f126..b3c61f9cc 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -512,12 +512,13 @@ Debian package. =cut sub field_list_src_dep() { - return sort { + my @list = sort { $FIELDS{$a}{'dep_order'} <=> $FIELDS{$b}{'dep_order'} } grep { field_is_allowed_in($_, CTRL_PKG_SRC) and exists $FIELDS{$_}{'dependency'} } keys %FIELDS; + return @list; } =item field_list_pkg_dep() @@ -530,12 +531,13 @@ the stronger to the weaker. sub field_list_pkg_dep() { my @keys = keys %FIELDS; - return sort { + my @list = sort { $FIELDS{$a}{'dep_order'} <=> $FIELDS{$b}{'dep_order'} } grep { field_is_allowed_in($_, CTRL_PKG_DEB) and exists $FIELDS{$_}{'dependency'} } @keys; + return @list; } =item field_get_dep_type($field) -- cgit v1.2.3