From d8a90a03e9c5e8e2732374a10e0e79289ffb793c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 30 May 2013 04:41:11 -0500 Subject: App::REPL -> Reply --- lib/Reply/Plugin/ReadLine.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/Reply/Plugin/ReadLine.pm (limited to 'lib/Reply/Plugin/ReadLine.pm') diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm new file mode 100644 index 0000000..dc9c617 --- /dev/null +++ b/lib/Reply/Plugin/ReadLine.pm @@ -0,0 +1,25 @@ +package Reply::Plugin::ReadLine; +use strict; +use warnings; + +use base 'Reply::Plugin'; + +use Term::ReadLine; + +sub new { + my $class = shift; + + my $self = $class->SUPER::new(@_); + $self->{term} = Term::ReadLine->new('Reply'); + + return $self; +} + +sub read_line { + my $self = shift; + my ($next, $prompt) = @_; + + return $self->{term}->readline($prompt); +} + +1; -- cgit v1.2.3-54-g00ecf