[perl-extutils-depends: 3/7] use hash not list-walk
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-extutils-depends: 3/7] use hash not list-walk
- Date: Fri, 7 May 2021 19:20:17 +0000 (UTC)
commit 41f1da5b35c77b96170c0e469d2666366b3ddd16
Author: Ed J <mohawk2 users noreply github com>
Date: Mon Apr 12 15:29:09 2021 +0100
use hash not list-walk
lib/ExtUtils/Depends.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index 32a6754..02fa260 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -230,6 +230,7 @@ sub _quote_if_space { $_[0] =~ / / ? qq{"$_[0]"} : $_[0] }
sub load_deps {
my $self = shift;
my @load = grep { not $self->{deps}{$_} } keys %{ $self->{deps} };
+ my %in_load; @in_load{@load} = ();
foreach my $d (@load) {
my $dep = load ($d);
$self->{deps}{$d} = $dep;
@@ -239,7 +240,7 @@ sub load_deps {
unless
$self->{deps}{$childdep}
or
- grep {$_ eq $childdep} @load;
+ exists $in_load{$childdep};
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]