summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Git/Annex/BatchCommand.pm8
-rwxr-xr-xt/13_batchcommand.t2
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/Git/Annex/BatchCommand.pm b/lib/Git/Annex/BatchCommand.pm
index 80fdd3c..aacad0e 100644
--- a/lib/Git/Annex/BatchCommand.pm
+++ b/lib/Git/Annex/BatchCommand.pm
@@ -100,6 +100,14 @@ sub say {
return wantarray ? @output : $output[$#output];
}
+=head2 ask($input, ...)
+
+Synonym for C<say> method.
+
+=cut
+
+*Git::Annex::BatchCommand::ask = \&Git::Annex::BatchCommand::say;
+
=head2 restart
Kill and restart the C<--batch> command.
diff --git a/t/13_batchcommand.t b/t/13_batchcommand.t
index 3d72e8f..bb529a4 100755
--- a/t/13_batchcommand.t
+++ b/t/13_batchcommand.t
@@ -53,6 +53,8 @@ with_temp_annexes {
is $response5, "foo/foo2/baz", "it returns a single result into a scalar";
my ($response6) = $batch->say("foo/foo2/baz");
is $response6, "foo/foo2/baz", "it still returns a list in list context";
+ is $batch->ask("foo/foo2/baz"), "foo/foo2/baz",
+ "you can ask as well as say";
undef $batch;
ok !kill(0, $second_pid),