NAME

CTK::CLI - Command line interface

VERSION

1.00

$Id: CLI.pm 38 2012-11-27 10:16:36Z minus $

SYNOPSIS

my $v = $c->cli_prompt('Your name:', 'anonymous');
debug( "Your name: $v" );

my $v = $c->cli_prompt3('Your name:');
debug( "Your name: $v" );

my $v = $c->cli_select('Your select:',[qw/foo bar baz/],'bar');
debug( "Your select: $v" );

my $v = $c->cli_select3('Your select:',[qw/foo bar baz/]);
debug( "Your select: $v" );

DESCRIPTION

Command line interface. Prompt and select methods

TO DO

* Use Term::ReadLine module. Sample:
  
  BEGIN { $ENV{TERM} = "dumb" if $^O eq "MSWin32" }
  use Term::ReadLine ();
  use Text::ParseWords qw(shellwords);

  my $term = new Term::ReadLine 'T01';
  my $prompt = "T> ";
  my $OUT = $term->OUT || \*STDOUT;
  while ( defined ($_ = $term->readline($prompt)) ) {
      last if /^(quit|exit)$/;
      my @w = shellwords($_);
      if (@w) {
      print join(" ",@w),"\n";
          $term->addhistory($_);
      }
  }
  print "\n";

AUTHOR

Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>.

COPYRIGHT

Copyright (C) 1998-2012 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.

This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).

See LICENSE file