From 57b18b44e1770b163aba55eacf53195a8305398e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 21 May 2016 05:27:06 +0000 Subject: localize $/ in more places to avoid potential problems This hopefully makes the intent of the code clearer, too. The the HTTP use of the numeric reference for getline caused problems in Git.pm, already. --- lib/PublicInbox/Feed.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index e2df97b1..6ed00856 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -224,6 +224,7 @@ sub each_recent_blob { my $nr = 0; my ($cur_commit, $first_commit, $last_commit); my ($ts, $subj, $u); + local $/ = "\n"; while (defined(my $line = <$log>)) { if ($line =~ /$addmsg/o) { my $add = $1; @@ -244,6 +245,7 @@ sub each_recent_blob { } if ($last) { + local $/ = "\n"; while (my $line = <$log>) { if ($line =~ /^(${hex}{7,40})/o) { $last_commit = $1; -- cgit v1.2.3-24-ge0c7