"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")
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+/);
'</pre><table>');
my $rel = $req->{relcmd};
- foreach (<$refs>) {
+ while (<$refs>) {
my ($ref, $type, $hex, $date, $s) = split(' ', $_, 5);
my $x = $ref eq $head_ref ? ' (HEAD)' : '';
$ref =~ s!\Arefs/(?:heads|tags)/!!;