Term::ReadLine::Zoid is a Perl module that provides a set of modules that form an interactive input buffer written in plain perl with minimal dependencies. It features almost all key-bindings described in the posix spec for the sh(1) utility with some extensions like multiline editing; this includes a vi-command mode with a save-buffer (for copy-pasting) and an undo-stack.
Historically this code was part of the Zoidberg shell, but this implementation is complete independent from zoid and uses the Term::ReadLine interface, so it can be used with other perl programs.
( The documentation sometimes referes to 'the application', this is the program using the ReadLine module for input. )
SYNOPSIS
# In your app:
use Term::ReadLine;
my $term = Term::ReadLine->new("my app");
my $prompt = "eval: ";
my $OUT = $term->OUT || *STDOUT;
while ( defined ($_ = $term->readline($prompt)) ) {
# Think while () {}
my $res = eval($_);
warn $@ if $@;
print $OUT $res, "
" unless $@;
}
# In some rc file
export PERL_RL=Zoid
Product's homepage
Requirements:
· Perl