diff options
author | Eric Wong <e@80x24.org> | 2016-07-27 22:28:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-27 22:28:51 +0000 |
commit | e0b7cf5eb5e6828d07094fa44be67e2d7d63e722 (patch) | |
tree | 7e83f74f701cdbf5e6a31520871ab1457813555d /lib/PublicInbox/Inbox.pm | |
parent | 6cf4ed00cfe766141572511d4ab2016cd6dafe46 (diff) | |
download | public-inbox-e0b7cf5eb5e6828d07094fa44be67e2d7d63e722.tar.gz |
Callers may have localized $/ to something else, so make sure we chomp the expected character(s) when calling chomp.
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 23b77213..4fbbb522 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -106,6 +106,7 @@ sub description { my $desc = $self->{description}; return $desc if defined $desc; $desc = try_cat("$self->{mainrepo}/description"); + local $/ = "\n"; chomp $desc; $desc =~ s/\s+/ /smg; $desc = '($GIT_DIR/description missing)' if $desc eq ''; @@ -118,6 +119,7 @@ sub cloneurl { return $url if $url; $url = try_cat("$self->{mainrepo}/cloneurl"); my @url = split(/\s+/s, $url); + local $/ = "\n"; chomp @url; $self->{cloneurl} = \@url; } |