From: "Gustavo L. de M. Chaves" <gnust...@cpan.org>

Git::activestate_pipe::READLINE implementation wasn't working when the
pipe was read in slurp-mode (i.e., with $/ undefined).

Now, when in slurp-mode it correctly returns the remaining lines
joined together.

Signed-off-by: Gustavo L. de M. Chaves <gnust...@cpan.org>
---
 perl/Git.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/perl/Git.pm b/perl/Git.pm
index 2d88b89..fdef024 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1410,8 +1410,10 @@ sub READLINE {
        return unless @{$self->{data}};
        if (wantarray) {
                return splice @{$self->{data}};
-       } else {
+       } elsif (defined $/) {
                return shift @{$self->{data}};
+       } else {
+               return join('', splice @{$self->{data}});
        }
 }
 
-- 
1.7.12.464.g83379df.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to