NAME

Term::ReadLine::Perl5 - A Perl5 implementation GNU Readline

SYNOPSIS

use Term::ReadLine::Perl5;
$term = Term::ReadLine::Perl5->new 'ProgramName';
while ( defined ($_ = $term->readline('prompt>')) ) {
  ...
}

DESCRIPTION

Overview

This is a implementation of the GNU Readline/History Library written in Perl5.

GNU Readline reads lines from an interactive terminal with emacs or vi editing capabilities. It provides as mechanism for saving history of previous input.

This package typically used in command-line interfaces and REPLs (Read, Eval, Print Loops).

SUBROUTINES

Term::ReadLine::Perl-new($name, [*IN, [*OUT])>

Returns a handle for subsequent calls to readline functions.

$name is the name of the application.

Optionally you can add two arguments for input and output filehandles. These arguments should be globs.

This routine might also be called via Term::ReadLine-new($term_name)> if other Term::ReadLine packages like Term::ReadLine::Gnu is not available or if you have $ENV{PERL_RL} set to 'Perl5';

At present, because this code has lots of global state, we currently don't support more than one readline instance.

Somebody please volunteer to rewrite this code!

stifle_history

stifle_history($max)

Stifle or put a cap on thethe history list, remembering only $max number of lines.

MinLine([$minlength])

If $minlength is given, set $readline::minlength the minimum length a $line for it to go into the readline history.

The previous value is returned.

remove_history

remove_history($which)

Remove history element $which from the history. The removed element is returned.

AUTHORS

Rocky Bernstein (current maintainer) Ilya Zakharevich (Term::ReadLine::Perl) Jeffrey Friedl (Original Perl4 code)

Contributors: Jordan M. Adler Clive Holloway

SEE ALSO

GNU Readline Library Manual
GNU History Library Manual
Term::ReadLine
Term::ReadLine::readline
Term::ReadLine::Perl
Term::ReadLine::Gnu