summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-08 14:40:06 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-08 14:41:28 -0500
commit6c4b97722ea6f8158e43b49bb8133e7385e1c0cc (patch)
treec1ea1404c32bbbf4d5c98f85e3687a831a123a60
parentc54e908ea3fb763e66ca2830eb8dbfab4567582c (diff)
downloadreply-6c4b97722ea6f8158e43b49bb8133e7385e1c0cc.tar.gz
reply-6c4b97722ea6f8158e43b49bb8133e7385e1c0cc.zip
doc updates
-rw-r--r--lib/Reply.pm11
-rw-r--r--lib/Reply/Plugin.pm5
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/Reply.pm b/lib/Reply.pm
index 6f7adb2..4826b25 100644
--- a/lib/Reply.pm
+++ b/lib/Reply.pm
@@ -102,7 +102,7 @@ sub new {
=method run
Runs the repl. Will continue looping until the C<read_line> callback returns
-undef.
+undef or the C<loop> callback returns false.
=cut
@@ -113,6 +113,15 @@ sub run {
print "\n";
}
+=method run_one($line)
+
+Runs a single iteration of the repl. If C<$line> is given, it will be used as
+the string to evaluate (and the C<prompt> and C<read_line> callbacks will not
+be called). Returns true if the repl can continue, and false if it was
+requested to quit.
+
+=cut
+
sub run_one {
my $self = shift;
my ($line) = @_;
diff --git a/lib/Reply/Plugin.pm b/lib/Reply/Plugin.pm
index 0e8fe45..5442a4f 100644
--- a/lib/Reply/Plugin.pm
+++ b/lib/Reply/Plugin.pm
@@ -112,8 +112,9 @@ implementation just uses C<print> to print them to the screen.
=item loop (chained)
-This callback is called at the end of each evaluation. It receives no
-parameters and returns nothing.
+This callback is called at the end of each evaluation. It receives whether the
+repl has been requested to terminate so far, and returns whether the repl
+should terminate.
=back