summaryrefslogtreecommitdiff
path: root/lib/Git/Annex/BatchCommand.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Git/Annex/BatchCommand.pm')
-rw-r--r--lib/Git/Annex/BatchCommand.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Git/Annex/BatchCommand.pm b/lib/Git/Annex/BatchCommand.pm
index e9e9379..80fdd3c 100644
--- a/lib/Git/Annex/BatchCommand.pm
+++ b/lib/Git/Annex/BatchCommand.pm
@@ -82,9 +82,9 @@ sub new {
Say a line or lines of input to the batch command's standard input.
Trailing line breaks in C<$input> are optional.
-In list context, returns a list of chomped git-annex's responses to
-the items of input, chomped. In scalar context, returns the number of
-trueish responses.
+In list context, returns a list of git-annex's responses to the items
+of input, chomped. In scalar context, returns the last of git-annex's
+responses, chomped.
=cut
@@ -97,7 +97,7 @@ sub say {
chomp(my $out = readline $self->{_out});
push @output, $out;
}
- return wantarray ? @output : scalar @output;
+ return wantarray ? @output : $output[$#output];
}
=head2 restart