diff options
author | Eric Wong <e@80x24.org> | 2017-02-08 21:41:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-09 00:00:03 +0000 |
commit | ba4c50c20b95679580beba1ef290a4281d5285b7 (patch) | |
tree | 250e2762c2fb7e0637b453623151052342aebd00 /lib/PublicInbox/Config.pm | |
parent | ed3ad34bbb10edbe6ea022cb2959eb556df89d6f (diff) | |
download | public-inbox-ba4c50c20b95679580beba1ef290a4281d5285b7.tar.gz |
There's no need to hold everything in memory, here, since apparently "foreach" will read everything at once in array context (for some reason, I thought Perl5 was smart enough to avoid creating a temporary array, here...)
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r-- | lib/PublicInbox/Config.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 28b5bdb5..f6275cdd 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -111,7 +111,7 @@ sub git_config_dump { my $fh = popen_rd(\@cmd) or die "popen_rd failed for $file: $!\n"; my %rv; local $/ = "\n"; - foreach my $line (<$fh>) { + while (defined(my $line = <$fh>)) { chomp $line; my ($k, $v) = split(/=/, $line, 2); my $cur = $rv{$k}; |