From: Don Armstrong Date: Sun, 2 Jul 2017 23:06:00 +0000 (-0700) Subject: Use List::AllUtils instead of List::Utils and List::MoreUtils X-Git-Tag: release/2.6.0~109 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=ef8bd23ff686d78c1fbc8e51bdeb0630f1f53fae Use List::AllUtils instead of List::Utils and List::MoreUtils Because some commands have migrated from List::MoreUtils and List::Utils at different times, we would have to run slightly different code in unstable, stable, and oldstable. List::AllUtils wraps around this madness so we don't have to think about it. --- diff --git a/.travis.yml b/.travis.yml index 207aaaa..4eed5cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: libhttp-server-simple-perl libtest-www-mechanize-perl libmail-rfc822-address-perl libsafe-hole-perl libuser-perl libconfig-simple-perl libtest-pod-perl - liblist-moreutils-perl libtext-template-perl graphviz + liblist-allutils-perl libtext-template-perl graphviz libfile-libmagic-perl libgravatar-url-perl libwww-perl imagemagick script: - make; make test diff --git a/Debbugs/Bugs.pm b/Debbugs/Bugs.pm index e678aff..f8e049d 100644 --- a/Debbugs/Bugs.pm +++ b/Debbugs/Bugs.pm @@ -58,7 +58,7 @@ use Debbugs::Packages qw(getsrcpkgs getpkgsrc); use Debbugs::Common qw(getparsedaddrs package_maintainer getmaintainers make_list); use Fcntl qw(O_RDONLY); use MLDBM qw(DB_File Storable); -use List::Util qw(first); +use List::AllUtils qw(first); use Carp; =head2 get_bugs diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index 9cc4d51..c70f682 100644 --- a/Debbugs/CGI.pm +++ b/Debbugs/CGI.pm @@ -49,7 +49,7 @@ use Mail::Address; use POSIX qw(ceil); use Storable qw(dclone); -use List::Util qw(max); +use List::AllUtils qw(max); use File::stat; use Digest::MD5 qw(md5_hex); use Carp; diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index 02b0197..0fd134a 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -45,7 +45,7 @@ use POSIX qw(strftime); use Encode qw(decode_utf8 encode_utf8); use URI::Escape qw(uri_escape_utf8); use Scalar::Util qw(blessed); -use List::Util qw(sum); +use List::AllUtils qw(sum); use File::Temp; BEGIN{ diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index aaa8925..807549f 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -134,7 +134,7 @@ use Mail::RFC822::Address qw(); use POSIX qw(strftime); use Storable qw(dclone nfreeze); -use List::Util qw(first max); +use List::AllUtils qw(first max); use Encode qw(encode_utf8); use Carp; diff --git a/Debbugs/Control/Service.pm b/Debbugs/Control/Service.pm index 32e1f97..52d7d10 100644 --- a/Debbugs/Control/Service.pm +++ b/Debbugs/Control/Service.pm @@ -94,7 +94,7 @@ use Debbugs::Common qw(cleanup_eval_fail); use Debbugs::Control qw(:all); use Debbugs::Status qw(splitpackages); use Params::Validate qw(:types validate_with); -use List::Util qw(first); +use List::AllUtils qw(first); my $bug_num_re = '-?\d+'; my %control_grammar = diff --git a/Debbugs/MIME.pm b/Debbugs/MIME.pm index f114c68..1d8fcb5 100644 --- a/Debbugs/MIME.pm +++ b/Debbugs/MIME.pm @@ -54,7 +54,7 @@ use File::Temp qw(tempdir); use MIME::Parser; use POSIX qw(strftime); -use List::MoreUtils qw(apply); +use List::AllUtils qw(apply); # for convert_to_utf8 use Debbugs::UTF8 qw(convert_to_utf8); diff --git a/Debbugs/Packages.pm b/Debbugs/Packages.pm index c7fd47c..27117ab 100644 --- a/Debbugs/Packages.pm +++ b/Debbugs/Packages.pm @@ -39,7 +39,7 @@ use Storable qw(dclone); use Params::Validate qw(validate_with :types); use Debbugs::Common qw(make_list globify_scalar sort_versions); -use List::Util qw(min max); +use List::AllUtils qw(min max); use IO::File; diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 6fe1c1a..c9f5709 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -49,7 +49,7 @@ use File::Copy qw(copy); use Encode qw(decode encode is_utf8); use Storable qw(dclone); -use List::Util qw(min max); +use List::AllUtils qw(min max); use Carp qw(croak); diff --git a/Debbugs/User.pm b/Debbugs/User.pm index c25b35a..2457e54 100644 --- a/Debbugs/User.pm +++ b/Debbugs/User.pm @@ -86,7 +86,7 @@ use vars qw($VERSION $DEBUG %EXPORT_TAGS @EXPORT_OK @EXPORT); use Exporter qw(import); use Debbugs::Config qw(:config); -use List::Util qw(min); +use List::AllUtils qw(min); use Carp; use IO::File; diff --git a/Makefile.PL b/Makefile.PL index 142f84a..1593964 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -34,8 +34,7 @@ WriteMakefile(FIRST_MAKEFILE => 'Makefile.perl', 'IPC::Open3' => 0, 'IPC::Run' => 0, 'Libravatar::URL' => 0, - 'List::MoreUtils' => 0, - 'List::Util' => 0, + 'List::AllUtils' => 0, 'LWP::UserAgent' => 0, 'Mail::Address' => 0, 'Mail::CrossAssassin' => 0, diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 5f88e18..dcf3e36 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -30,7 +30,7 @@ use Scalar::Util qw(looks_like_number); use Debbugs::Text qw(:templates); -use List::Util qw(max); +use List::AllUtils qw(max); use CGI::Simple; diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index a0d7685..abf739d 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -20,7 +20,7 @@ BEGIN{ binmode(STDOUT,':encoding(UTF-8)'); use POSIX qw(strftime nice); -use List::Util qw(uniq); +use List::AllUtils qw(uniq); use Debbugs::Config qw(:globals :text :config); diff --git a/debian/control b/debian/control index 3ffe4e7..1105a49 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Build-Depends-Indep: libparams-validate-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libhttp-server-simple-perl, libtest-www-mechanize-perl, libmail-rfc822-address-perl, libsafe-hole-perl, libuser-perl, - libconfig-simple-perl, libtest-pod-perl, liblist-moreutils-perl, + libconfig-simple-perl, libtest-pod-perl, liblist-alltils-perl, # used by Debbugs::Libravatar and libravatar.cgi libfile-libmagic-perl, libgravatar-url-perl, libwww-perl, imagemagick, libtext-template-perl, graphviz diff --git a/scripts/gen-indices b/scripts/gen-indices index 7a8670d..1f0e7df 100755 --- a/scripts/gen-indices +++ b/scripts/gen-indices @@ -18,7 +18,7 @@ use Getopt::Long; use Pod::Usage; use File::stat; -use List::Util qw(min); +use List::AllUtils qw(min); use Debbugs::Common qw(make_list); diff --git a/scripts/service b/scripts/service index 0059ef7..0196e26 100755 --- a/scripts/service +++ b/scripts/service @@ -40,7 +40,7 @@ use Debbugs::Text qw(:templates); use Scalar::Util qw(looks_like_number); -use List::Util qw(first); +use List::AllUtils qw(first); use Mail::RFC822::Address; use Encode qw(decode encode);