about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepobrowseBase.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-02-09 00:26:52 +0000
committerEric Wong <e@80x24.org>2017-02-09 00:41:39 +0000
commit1ab8dabe04ebba61fd8761dca3d569947cbe20be (patch)
treea573f8a477ab3286567c3ab5ca4ca39568dc0f49 /lib/PublicInbox/RepobrowseBase.pm
parent68b310207929db23667ca5d454a78af9d65589f2 (diff)
downloadpublic-inbox-1ab8dabe04ebba61fd8761dca3d569947cbe20be.tar.gz
"foreach (<$fh>)" in Perl requests lines in array
context, so use "while" instead for lazy reading.

This follows ba4c50c20b95679580beba1ef290a4281d5285b7
in master ("config: do not slurp lines into memory")
Diffstat (limited to 'lib/PublicInbox/RepobrowseBase.pm')
-rw-r--r--lib/PublicInbox/RepobrowseBase.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/RepobrowseBase.pm b/lib/PublicInbox/RepobrowseBase.pm
index caec5ced..44f422df 100644
--- a/lib/PublicInbox/RepobrowseBase.pm
+++ b/lib/PublicInbox/RepobrowseBase.pm
@@ -24,7 +24,7 @@ sub mime_load {
         my ($self, $file) = @_;
         my %rv;
         open my $fh, '<', $file or return \%rv;
-        foreach (<$fh>) {
+        while (<$fh>) {
                 next if /^#/; # no comments
                 my ($type, @ext) = split(/\s+/);