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=ee66a95256b14a131bfd41ab8bd0d26c7a52c6b1 commit ee66a95256b14a131bfd41ab8bd0d26c7a52c6b1 Author: Guillem Jover <[email protected]> AuthorDate: Wed Jun 25 03:52:40 2025 +0200 Test::Dpkg: Optimize modules skipping in all_pod_modules() Use a hash instead of using «any» to traverse the list each time. This also removes the now unnecessary List::Util dependency. --- scripts/Test/Dpkg.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Test/Dpkg.pm b/scripts/Test/Dpkg.pm index b07c402ad..3ad639458 100644 --- a/scripts/Test/Dpkg.pm +++ b/scripts/Test/Dpkg.pm @@ -71,7 +71,6 @@ our %EXPORT_TAGS = ( ); use Exporter qw(import); -use List::Util qw(any); use Cwd; use File::Find; use File::Basename; @@ -188,6 +187,7 @@ sub all_perl_modules sub all_pod_modules { my @modules_todo = @_; + my %modules_todo = map { $_ => 1 } @modules_todo; my @modules; require Module::Metadata; @@ -205,7 +205,7 @@ sub all_pod_modules $module =~ s{^\Q$File::Find::topdir\E/}{}; $module =~ s{/}{::}g; - return if any { $module eq $_ } @modules_todo; + return if exists $modules_todo{$module}; push @modules, $module; }; -- Dpkg.Org's dpkg

