Term::Clui

Term::Clui.pm is a Perl module offering a Command-Line User Interface.
Download

Term::Clui Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Peter J Billam
  • Publisher web site:
  • http://search.cpan.org/~pjb/

Term::Clui Tags


Term::Clui Description

Term::Clui.pm is a Perl module offering a Command-Line User Interface. Term::Clui.pm is a Perl module offering a Command-Line User Interface.SYNOPSIS use Term::Clui; $chosen = &choose("A Title", @a_list); # single choice @chosen = &choose("A Title", @a_list); # multiple choice $x = &choose("Which ?n(Arrow-keys and Return)", @w); # multi-line question if (&confirm($text)) { &do_something(); }; $answer = &ask($question); $answer = &ask($question,$suggestion); $password = &ask_password("Enter password : "); $newtext = &edit($title, $oldtext); &edit($filename); &view($title, $text) # if $title is not a filename &view($textfile) # if $textfile _is_ a filename &edit (&choose ("Edit which file ?", grep (-T, readdir D)));Term::Clui offers a high-level user interface to give the user of command-line applications a consistent "look and feel". Its metaphor for the computer is as a human-like conversation-partner, and as each question/response is completed it is summarised onto one line, and remains on screen, so that the history of the session gradually accumulates on the screen and is available for review, or for cut/paste. This user interface can therefore be intermixed with standard applications which write to STDOUT or STDERR, such as make, pgp, rcs etc.For the user, &choose uses arrow keys (or hjkl) and Return or q; also SpaceBar for multiple choices. &confirm expects y, Y, n or N. In general, ctrl-L redraws the (currently active bit of the) screen. &edit and &view use the default EDITOR and PAGER if possible.It's fast, simple, and has few external dependencies. It doesn't use curses (which is a whole-of-screen interface); it uses a small subset of vt100 sequences (up down left right normal and reverse) which are very portable.There is an associated file selector, Term::Clui::FileSelectThis is Term::Clui.pm version 1.37, #COMMENT#. Requirements: · Perl


Term::Clui Related Software