summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-08-29 09:52:35 -0400
committerJesse Luehrs <doy@tozt.net>2013-08-29 09:52:35 -0400
commit242a39254f4a3fc81550ddc1f7a79eef5e33011d (patch)
tree24981f7504797d85db445d354c1b0e44c38ad8ad
parentf2297eebc71791ffde359a3d9ddb2bf48dad34f3 (diff)
downloadreply-242a39254f4a3fc81550ddc1f7a79eef5e33011d.tar.gz
reply-242a39254f4a3fc81550ddc1f7a79eef5e33011d.zip
explicitly read from STDIN (lestrrat, fixes #26)
<> has magic @ARGV behavior
-rw-r--r--lib/Reply/Plugin.pm2
-rw-r--r--lib/Reply/Plugin/Defaults.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Reply/Plugin.pm b/lib/Reply/Plugin.pm
index 14cfcc8..2c06e8e 100644
--- a/lib/Reply/Plugin.pm
+++ b/lib/Reply/Plugin.pm
@@ -68,7 +68,7 @@ implementation returns C<< ">" >>
Called to actually read a line from the user. Takes no arguments, and returns a
single string. The default implementation uses the C<< <> >> operator to read a
-single line from the user.
+single line from C<STDIN>.
=item command_C<$name> (chained)
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm
index d2acfbc..e7874e3 100644
--- a/lib/Reply/Plugin/Defaults.pm
+++ b/lib/Reply/Plugin/Defaults.pm
@@ -31,7 +31,7 @@ sub read_line {
my ($next, $prompt) = @_;
print $prompt;
- return scalar <>;
+ return scalar <STDIN>;
}
(my $PREFIX = <<'PREFIX') =~ s/__PACKAGE__/__PACKAGE__/ge;