This distribution has been tested as part of the cpan-testers
effort to test as many new uploads to CPAN as possible. See
http://testers.cpan.org/
--
Dear Hans Oesterholt-Dijkema,
This is a computer-generated report for Term-Screen-Wizard-0.56
on perl
5.6.2, created by CPAN-Reporter-1.1651.
Thank you for uploading your work to CPAN. Congratulations!
All tests were successful.
Sections of this report:
* Tester comments
* Program output
* Prerequisites
* Environment and other context
------------------------------
TESTER COMMENTS
------------------------------
Additional comments from tester:
none provided
------------------------------
PROGRAM OUTPUT
------------------------------
Output from '/usr/bin/make test':
PERL_DL_NONLAZY=1 /
usr/local/bin/perl5.6.2 "-Iblib/lib" "-Iblib/arch" test.pl
1..5
Test 1, loading the module and allocating screen
[1;1Hok 1
[H[J[H[J[1;1HTest 2(1), TESTING THE WIZARD, enter some things here, please also test F1[2;1H--------------------------------------------------------------------------------[78;1H F1 - Help Esc - Annuleren F3 - Vorige Ctrl-Enter (F4) - Volgende[77;1H--------------------------------------------------------------------------------[4;1HProces Id[5;1HIntern of Extern Proces (I/E)[6;1HBeschrijving Proces[7;1HEnter a password[4;31H: 123456789.00.04[5;31H: [6;31H: [7;31H: [4;33H123456789.00.04 [4;48H[4;33H123456789.00.04[5;33H [5;33H[5;33H[6;33H [6;33H[6;33H[7;33H [7;33H[7;33H[H[J[1;1HTest 2(2), TESTING THE WIZARD, enter some things here, please also test F1[2;1H--------------------------------------------------------------------------------[78;1H F1 - Help Esc - Annuleren F3 - Vorige Ctrl-Enter - Volgende[77;1H--------------------------------------------------------------------------------[4;1HCOUNTRY[5;1HAMDM[6;1HPRDM[7;1HORGANISATION[8;1HUNIT1[9;1HUNIT2[10;1HUNIT3[4;14H: [5;14H: [6;14H: [7;14H: [8;14H: [9;14H: [10;14H: [4;16H [4;16H[4;16H[5;16H [5;16H[5;16H[6;16H [6;16H[6;16H[7;16H [7;16H[7;16H[8;16H [8;16H[8;16H[9;16H [9;16H[9;16H[10;16H [10;16H[10;16H[H[J[1;1HTest 2(3), TESTING THE WIZARD, enter some things here, please also test F1[2;1H--------------------------------------------------------------------------------[78;1!
H Esc
- Annuleren F3 - Vorige Ctrl-Enter - Klaar[77;1H--------------------------------------------------------------------------------[4;1HINT[5;1HDOUBLE[6;1HDATUM[4;8H: [5;8H: [6;8H: [4;10H [4;10H[4;10H[5;10H [5;10H[5;10H[6;10H [6;10H20000101[6;10H20000101
finish, ok 2
Only PROCES and GETALLEN[H[J[1;1Hproces scherm is read only nu[2;1H--------------------------------------------------------------------------------[78;1H F1 - Help Esc - Annuleren F3 - Vorige Ctrl-Enter (F4) - Volgende[77;1H--------------------------------------------------------------------------------[4;1HProces Id[5;1HIntern of Extern Proces (I/E)[6;1HBeschrijving Proces[7;1HEnter a password[4;31H: 123456789.00.04[5;31H: [6;31H: [7;31H: [4;33H123456789.00.04 [4;48H[4;33H123456789.00.04[5;33H [5;33H[5;33H[6;33H [6;33H[6;33H[7;33H [7;33H[7;33H[H[J[1;1Hdit is de header[2;1H--------------------------------------------------------------------------------[78;1H Esc - Annuleren F3 - Vorige Ctrl-Enter - Klaar[77;1H--------------------------------------------------------------------------------[4;1HINT[5;1HDOUBLE[6;1HDATUM[4;8H: [5;8H: 999.99[6;8H: 20000101[4;10H [4;10H[4;10H[5;10H999.99 [5;16H[5;10H999.99[6;10H20000101 [6;18H[6;10H20000101
finish, ok 3
[H[JTest 4, printing the entered values in the wizard.
Wizard result was : 'finish'
PROCES
TYPE=
PASSWORD=
OMSCHRIJVING=
PROCESID=123456789.00.04
X.400
OU3=
AMDM=
COUNTRY=
PRDM=
OU1=
OU2=
ORG=
GETALLEN
ADOUBLE=999.99
ANINT=
DATUM=20000101
finish, ok 4
package Term::Screen::Wizard;
use strict;
no strict 'refs';
use base qw(Term::Screen::ReadLine);
use Term::Screen::ReadLine;
use vars qw($VERSION);
BEGIN {
$VERSION=0.56;
}
sub system {
my $self=shift;
my $cmd;
foreach my $f (@_) {
$cmd.="$f ";
}
system "stty -raw echo";
system @_;
system "stty raw -echo";
}
sub add_screen {
my $self = shift;
my $args = {
NAME => "noname",
HEADER => "",
FOOTER => "",
CANCEL => "Esc - Cancel",
NEXT => "Ctrl-Enter - Next",
PREVIOUS => "F3 - Previous",
FINISH => "Ctrl-Enter - Finish",
NOFINISH => 0,
HASPREVIOUS => 0,
HELPTEXT => undef,
HELP => "F1 - Help",
ROW => 2,
COL => 2,
PROMPTS => undef,
READONLY => undef,
@_,
};
my $arr=$self->{SCREENS};
my @array;
#$self->del_screen($args->{NAME});
foreach my $scr (@{ $self->{SCREENS} }) {
return 0 if ($scr->{NAME} eq $args->{NAME});
}
if ($arr) { @array=@$arr; }
push @array, $args;
$self->{SCREENS}=\@array;
return 1;
}
sub del_screen {
my $self = shift;
my $name = shift;
my $i;
my %%screen;
my $scr;
my $arr=$self->{SCREENS};
my @array=@$arr;
my @narray=();
my $retval=0;
$self->{SCREENS}=();
foreach $scr (@array) {
if ($scr->{NAME} eq $name) {
$retval=1;
}
else {
push @narray,$scr;
}
}
$self->{SCREENS}=\@narray;
return 0;
}
sub get_keys {
my $self = shift;
my $scr;
my %%values;
my %%screens;
my $screens;
foreach $scr (@_) { $screens{$scr}=1;$screens+=1; }
if ($screens == 0) {my $a;
foreach $a (@{ $self->{SCREENS} }) {
$screens{$a->{NAME}}=1;
}
}
for $scr (@{ $self->{SCREENS} }) {
next if (not exists $screens{$scr->{NAME}});
my $prompt;
my $name=$scr->{NAME};
for $prompt (@{ $scr->{PROMPTS} }) {
#$self->at(22,0)->puts($prompt->{KEY})->puts(" - ")->puts($prompt->{NEWVALUE})->getch();
$values{$name}{$prompt->{KEY}}=$prompt->{VALUE};
}
}
return %%values;
}
sub wizard {
my $self=shift;
my $i=0;
my $arr=$self->{SCREENS};
my @array=@$arr;
my $scr;
my $i;
my $N;
my $what;
my $footer;
my $space=chr(32).chr(32).chr(32);
my $scr_name;
my @screens;
$N=0;
if ($self->{COLS} <= 0) {
die "Term::Screen::COLS <= 0, please set environment variable \$COLUMNS\n";
}
if ($self->{ROWS} <= 0) {
die "Term::Screen::ROWS <= 0, please set environment variable \$LINES\n";
}
foreach $i (@_) {
push @screens,$i;
}
$N=scalar @screens;
if ($N == 0) {my $a;
foreach $a (@array) {
push @screens,$a->{NAME};
}
}
$N=scalar @screens;
$i=0;
while ($i < $N) {
$scr_name=$screens[$i];
foreach my $a ( @array ) {
if ($scr_name eq $a->{NAME}) {
$scr=$a;
last;
}
}
$footer="";
if ($scr->{HELPTEXT}) { $footer.=$space.$scr->{HELP}; }
$footer.=$space.$scr->{CANCEL};
if ($i > 0 or $scr->{HASPREVIOUS} ) { $footer.=$space.$scr->{PREVIOUS}; }
if ($i < $N-1 or $scr->{NOFINISH} ) { $footer.=$space.$scr->{NEXT}; }
if ($i == $N-1 and not $scr->{NOFINISH} ) { $footer.=$space.$scr->{FINISH}; }
$scr->{FOOTER}=$footer;
$what=$self->_display_screen($scr);
if ($what eq "previous") {
if ($i==0 and $scr->{HASPREVIOUS}) { last; }
if ($i >0) { $i-=1; }
}
elsif ($what eq "next") {
$i++;
if ($i == $N) { last; }
}
else {
last;
}
}
if ($what ne "cancel") {
my $scr_name;
$what="finish" if ($what ne "previous");
foreach $scr_name (@screens) {
foreach my $a ( @array ) {
if ($scr_name eq $a->{NAME}) {
$scr=$a;
last;
}
}
my $prompt;
if ($scr->{NOFINISH}) {
$what="next" if ($what ne "previous");
}
else {
$what="finish" if ($what ne "previous");
}
foreach $prompt (@{ $scr->{PROMPTS} }) {
$prompt->{VALUE}=$prompt->{NEWVALUE};
$prompt->{NEWVALUE}=undef;
}
}
}
else {
foreach $scr_name (@screens) {
foreach my $a ( @array ) {
if ($scr_name eq $a->{NAME}) {
$scr=$a;
last;
}
}
foreach my $prompt (@{ $scr->{PROMPTS} }) {
$prompt->{NEWVALUE}=undef;
}
}
}
return $what;
}
sub _display_screen {
my $self = shift;
my $scr = shift;
my $prompt;
my $promptlen;
my $displen;
my $i;
my $key;
my @prompts=@{ $scr->{PROMPTS} };
my $line;
my $N;
my $val;
my $only;
my $convert;
my $dashes;
my %%keys;
my $valid;
%%keys = ( "esc" => 1,
"ctrl-enter" => 1,
"pgdn" => 1,
"pgup" => 1,
"k3" => 1,
"k4" => 1,
"k1" => 2,
);
{my $i;
for(1..$self->{COLS}) {
$dashes.="-";
}
}
$N=scalar @prompts;
$key="none";
while (not defined $keys{$key} or $keys{$key} == 2) {
$self->clrscr();
if ($scr->{HEADER}) {
$self->at(0,0)->puts($scr->{HEADER});
$self->at(1,0)->puts($dashes);
}
if ($scr->{FOOTER}) {
$self->at($self->{ROWS}-1,0)->puts($scr->{FOOTER});
$self->at($self->{ROWS}-2,0)->puts($dashes);
}
if ($key eq "k1") {
$self->at(3,0)->puts($scr->{HELPTEXT});
$self->getch();
$key="";
next;
}
$key="";
$promptlen=0;
$i=3;
foreach $prompt ( @prompts ) {
my $s=$prompt->{PROMPT};
if (($prompt->{KEY} ne "NIL") and (not $prompt->{NIL})) {
if (length $s > $promptlen) { $promptlen=length $s; }
}
else {
$prompt->{NIL}=1;
}
$self->at($i,0)->puts($prompt->{PROMPT});
$i++;
}
$promptlen++;
$displen=$self->{COLS}-$promptlen-3; # see increment of promptlen below
$i=3;
foreach $prompt ( @prompts ) {
if (not defined $prompt->{NEWVALUE}) {
$val=$prompt->{VALUE};
$prompt->{NEWVALUE}=$val;
}
else {
$val=$prompt->{NEWVALUE};
}
my $L=length $val;
if ($prompt->{PASSWORD}) {
$val=$self->setstr("*",$L);
}
if ($L>$displen) { $L=$displen; }
$val=substr($val,0,$L);
if (not $prompt->{NIL}) {
$self->at($i,$promptlen)->puts(": $val");
}
$i++;
}
$promptlen+=2;
$i=0;
while (($i < $N) and $prompts[$i]->{NIL}) {
$i+=1;
}
#print "$i\n";getc();
while (not defined $keys{$key}) {
if ($prompts[$i]->{ONLYVALID}) {
$only=$prompts[$i]->{ONLYVALID};
}
else {
$only=undef;
}
if ($prompts[$i]->{CONVERT}) {
$convert=$prompts[$i]->{CONVERT};
}
else {
$convert=undef;
}
my $readonly=$scr->{READONLY};
if (not defined $readonly) {
$readonly=$prompts[$i]->{READONLY};
}
$line=$self->readline(ROW => $i+3, COL => $promptlen,
LEN => $prompts[$i]->{LEN},
DISPLAYLEN => $displen,
LINE => $prompts[$i]->{NEWVALUE},
EXITS => { "pgup" => "pgup", "pgdn" => "pgdn", "k1" => "k1", "k3" => "k3", "k4" => "k4" },
ONLYVALID => $only,
CONVERT => $convert,
PASSWORD => $prompts[$i]->{PASSWORD},
NOCOMMIT => $prompts[$i]->{NOCOMMIT},
READONLY => $readonly,
);
{my $L=length $line;
my $val=$line;
if ($L>$displen) { $L=$displen; }
if ($prompts[$i]->{PASSWORD}) {
$val=$self->setstr("*",$L);
}
$val=substr($val,0,$L);
$self->at($i+3,$promptlen)->puts($val);
}
if ((exists $prompts[$i]->{VALIDATOR}) and ($self->lastkey() ne "esc")) {
my $expr=$prompts[$i]->{VALIDATOR};
if (not $expr=~/::/) { $expr="::".$expr; }
$valid=&$expr($self,$line);
}
else {
$valid=1;
}
if ($valid) {
$prompts[$i]->{NEWVALUE}=$line;
$key=$self->lastkey();
#$self->at(22,0)->puts(" $key - $line")->getch();
}
else {
$key=$self->lastkey();
if ($key ne "k1" and $key ne "esc" and $key ne "k3") { $key=""; }
}
if ($key eq "tab" or $key eq "enter" or $key eq "kd") {
if ($prompts[$i]->{READY} and ((length $line) gt 0)) {
$i=$N;
}
else {
$i+=1;
while ($prompts[$i]->{NIL} and ($i < $N)) {
$i++;
}
}
if ($i >= $N) {
$i=0;
if ($key eq "enter") {
$key="ctrl-enter";
}
}
}
elsif ( $key eq "ku" ) {
$i--;
while ($prompts[$i]->{NIL} and ($i >= 0)) {
$i--;
}
if ($i < 0 ) { $i=$N-1;
while ($prompts[$i]->{NIL} and ($i >= 0)) {
$i--;
}
}
}
}
}
if ($key eq "esc") {
return "cancel";
}
elsif ($key eq "ctrl-enter" or $key eq "pgdn" or $key eq "k4" ) {
return "next";
}
elsif ($key eq "pgup" or $key eq "k3" ) {
return "previous";
}
}
sub set {
my $self = shift;
my $screen = shift;
my $scr = $self->_get_screen($screen)
or die "unknown screen \"$screen\"";
my $id = shift;
if (exists $scr->{$id}) {
if ($id eq "PROMPTS") {
my $key=shift;
my $found=0;
my @prompts=@{$scr->{PROMPTS}};
my $prompt;
foreach $prompt (@prompts) {
if ($prompt->{KEY} eq $key) {
my $id=shift;
my $val=shift;
$found=1;
$prompt->{$id}=$val;
}
}
if (not $found) {
die "Can't find key <$key> in prompts of screen\n";
}
}
else {
$scr->{$id}=shift;
}
}
else {
my $found=0;
my $prompt;
my @prompts=@{$scr->{PROMPTS}};
foreach $prompt (@prompts) {
if ($prompt->{KEY} eq $id) {
$prompt->{VALUE}=shift;
$found=1;
last;
}
}
if (not $found) {
die "Can't find key <$id> in screen or prompts of screen\n";
}
}
return $self;
}
sub get {
my $self = shift;
my $screen = shift;
my $scr = $self->_get_screen($screen)
or die "unknown screen \"$screen\"";
my $id = shift;
if (exists $scr->{$id}) {
if ($id eq "PROMPTS") {
my $key=shift;
my $found=0;
my @prompts=@{$scr->{PROMPTS}};
my $prompt;
foreach $prompt (@prompts) {
if ($prompt->{KEY} eq $key) {
my $id=shift;
#$self->at(17,0)->puts("$key");
#$self->at(18,0)->puts("$id=")->puts($prompt->{$id})->getch();
$found=1;
return $prompt->{$id};
}
}
if (not $found) {
die "Can't find key <$key> in prompts of screen\n";
}
}
else {
return $scr->{$id};
}
}
else {
my $found=0;
my $prompt;
my @prompts=@{$scr->{PROMPTS}};
foreach $prompt (@prompts) {
if ($prompt->{KEY} eq $id) {
return $prompt->{VALUE};
$found=1;
last;
}
}
if (not $found) {
die "Can't find key <$id> in screen or prompts of screen\n";
}
}
}
sub _get_screen {
my $self = shift;
my $name = shift;
my %%screen;
my $scr;
my $arr=$self->{SCREENS};
my @array=@$arr;
foreach $scr (@array) {
if ($scr->{NAME} eq $name) {
return $scr;
}
}
return undef;
}
=pod
=head1 NAME
Term::Screen::Wizard - A wizard on your terminal...
=head1 SYNOPSIS
use Term::Screen::Wizard;
$scr = new Term::Screen::Wizard;
$scr->clrscr();
$scr->add_screen(
NAME => "PROCES",
HEADER => "Give me the new process id",
CANCEL => "Esc - Annuleren",
NEXT => "Ctrl-Enter - Volgende",
PREVIOUS => "F3 - Vorige",
FINISH => "Ctrl-Enter - Klaar",
PROMPTS => [
{ KEY => "PROCESID", PROMPT => "Proces Id", LEN=>32, VALUE=>"123456789.00.04" , ONLYVALID => "[a-zA-Z0-9.]*" },
{ KEY => "TYPE", PROMPT => "Intern or Extern Process (I/E)", CONVERT => "up", LEN=>1, ONLYVALID=>"[ieIE]*" },
{ KEY => "OMSCHRIJVING", PROMPT => "Description of Proces", LEN=>75 },
{ KEY => "PASSWORD", PROMPT => "Enter a password", LEN=>14, PASSWORD=>1 }
],
#
# OK This helptext is in Dutch, but it's clear how it works isn't it?
#
HELPTEXT => "\n\n\n".
" In dit scherm kan een nieuw proces Id worden opgevoerd\n".
"\n".
" ProcesId - is het ingevoerde Proces Id\n".
" Intern/Extern - is het proces belastingdienst intern of niet?\n".
" Omschrijving - Een korte omschrijving van het proces.\n"
);
$scr->add_screen(
NAME => "X.400",,
HEADER => "Voer het X.400 adres in",
#
# So the point is you can change the Wizard 'buttons'.
#
CANCEL => "Esc - Annuleren",
NEXT => "Ctrl-Enter - Volgende",
PREVIOUS => "F3 - Vorige",
FINISH => "Ctrl-Enter - Klaar",
PROMPTS => [
{ KEY => "COUNTRY", PROMPT => "COUNTRY", LEN => 2, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "AMDM", PROMPT => "AMDM", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "PRDM", PROMPT => "PRDM", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "ORG", PROMPT => "ORGANISATION", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "OU1", PROMPT => "UNIT1", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "OU2", PROMPT => "UNIT2", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
{ KEY => "OU3", PROMPT => "UNIT3", LEN => 16, CONVERT => "up", ONLYVALID => "[^/]*" },
],
HELPTEXT => "\n\n\n".
" In dit scherm kan een standaard X.400 adres worden ingevoerd voor een ProcesId",
);
$scr->add_screen(
NAME => "GETALLEN",,
HEADER => "Voer getallen in",
CANCEL => "Esc - Annuleren",
NEXT => "Ctrl-Enter - Volgende",
PREVIOUS => "F3 - Vorige",
FINISH => "Ctrl-Enter - Klaar",
PROMPTS => [
{ KEY => "ANINT", PROMPT => "INT", LEN => 10, CONVERT => "up", ONLYVALID => "[0-9]*" },
{ KEY => "ADOUBLE", PROMPT => "DOUBLE", LEN => 16, CONVERT => "up", ONLYVALID => "[0-9]+([.,][0-9]*)?" },
],
);
$scr->wizard();
$scr->wizard("PROCES","GETALLEN");
$scr->clrscr();
%%values=$scr->get_keys();
@array=( "PROCES", "X.400", "GETALLEN" );
for $i (@array) {
print "\n$i\n\r";
for $key (keys %% { $values{$i} }) {
my $val=$values{$i}{$key};
print " $key=$val\n\r";
}
}
%%values=$scr->get_keys("X.400","PROCES");
exit;
=head1 DESCRIPTION
This is a module to have a Wizard on a Terminal. It inherits from
Term::Screen::ReadLine. The module provides some functions to add
screens. The result is a Hash with keys that have the (validated)
values that the used inputted on the different screens.
=head1 USAGE
Description of the interface.
add_screen(
NAME =>
,
HEADER => ,
CANCEL => ,
NEXT => ,
PREVIOUS => ,
FINISH => ,
HELP => ,
HELPTEXT =>
NOFINISH => <1/0 - Inidicates that this wizard is/is not (1/0) part
of an ongoing 'wizard sequence'>
READONLY => <1/0 - read only option to get a read only screen>
PROMPTS =>
)
This function add's a screen to the list of screens that the wizards goes
through sequentially. If NOFINISH==1, the finish 'button' is not used. Use
this, if the last screen of this wizard is not actually the last screen
of a sequence of wizards.
For instance, if you need to go one way or the other after the first screen,
you provide a wizard with one screen and no FINISH button. After that you
call the next sequence of screens.
PROMPTS => [
{ KEY => "ANINT", PROMPT => "INT", LEN => 10, CONVERT => "up", ONLYVALID => "[0-9]*", READONLY => 1 },
{ KEY => "ADOUBLE", PROMPT => "DOUBLE", LEN => 16, CONVERT => "up", ONLYVALID => "[0-9]+([.,][0-9]*)?" },
{ KEY => "DATE", PROMPT => "DATE", LEN => 8, CONVERT => "up", ONLYVALID => "[0-9]+", VALIDATOR => "ValidateCCYYMMDD" },
]
sub ValidateCCYYMMDD {
my $wizard=shift;
my $line=shift;
(...)
return <1/0>
}
Note the entries in PROMPTS :
KEY is the hash key with what you can access the field.
PROMPT is the prompt to use for the field.
LEN is the maximum length of the field.
CONVERT 'up' or 'lo' for uppercase or lowercase. If not used
it won't convert.
ONLYVALID is a regex to use for validation. Note: validation is
done *before* conversion! If not used, no validation is
done.
VALUE a default value to use. This value will change if the
wizard is used.
VALIDATOR a validator sub to validate a line of input, after it has
been inputted.
READONLY Set this prompt readonly.
NOCOMMIT defined/undefined ==> This field will not ask for a return,
works great for choices (LEN=1).
READY If this field has had it's input, go to the next screen.
del_screen()
This function deletes a screen with given name from the list of screens.
get_keys([screens])
Optional arguments are screens to use. Example:
%%values=$a->get_keys() -> gives all screens.
%%values=$a->get_keys("PROCESS","NUMBERS") -> gives only screens PROCESS and NUMBERS.
This function gives you all the keys in a hash of a hash. Actually
a hash of screens and each screen a hash of keys. See synopsis for
usage.
set(SCREEN,KEY,VALUE,...)
To set key KEY of screen SCREEN equal to VALUE. Example:
$wizard->set("NUMBERS",HEADER,"This is the new header");
sets the HEADER of screen NUMBERS to a new value.
$wizard->set("NUMBERS","ADOUBLE",999.999);
sets the prompt ADOUBLE of screen NUMBERS to 999.999
More examples:
$scr->set("GETALLEN",HEADER,"dit is de header");
$scr->set("GETALLEN","ADOUBLE",999.99);
$scr->set("PROCES",READONLY,1);
$scr->set("PROCES",HEADER,"proces scherm is read only nu");
$scr->set("GETALLEN",PROMPTS,ANINT,READONLY,1);
get(SCREEN,KEY,...)
To get the value of key KEY of screen SCREEN. Example:
$wizard->get(NUMBERS,HEADER);
$wizard->get(NUMBERS,PROMPTS,ANINT,PROMPT);
wizard([screens])
Optional arguments are screens to use. Example:
$result=$a->wizard() -> processes all screens.
$result=$a->wizard("PROCESS") -> processes only screen PROCESS.
This function starts the wizard.
Possible results are:
="cancel", the user canceled the wizard; values are not updated.
="finish", the user finished the wizard.
="next", the user finished the wizard and the last prompt
has option "NOFINISH".
=head1 AUTHOR
Hans Dijkema
=cut
1;
------------------------------
PREREQUISITES
------------------------------
Prerequisite modules loaded:
requires:
Module Need Have
---------------------- ---- ----
Term::Screen 0 1.03
Term::Screen::ReadLine 0.33 0.35
------------------------------
ENVIRONMENT AND OTHER CONTEXT
------------------------------
Environment variables:
PATH = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin:/usr/perl5.8.0/bin:/usr/bin:/bin:/usr/local/sbin...
PERL5LIB = /usr/local/src/CPAN/build/Term-Screen-ReadLine-0.35-uBTUSk/blib/arch:/usr/local/src/CPAN/build/Term...!
J/blib/a
rch:/usr/local/src/CPAN/build/version-0.76-tjJsqJ/blib/lib:/usr/local/src/CPAN/build/JCLYMAN-bxmDfP/blib/arch:/usr/local/src/CPAN/build/JCLYMAN-bxmDfP/blib/lib:/usr/local/src/CPAN/build/Text-NLP-0.1-XPpGhV/blib/arch:/usr/local/src/CPAN/build/Text-NLP-0.1-XPpGhV/blib/lib
PERL5OPT = -I/tmp/CPAN-Reporter-lib-5MbV -MDevel::Autoflush
PERL5_CPANPLUS_IS_RUNNING = 53823
PERL5_CPAN_IS_RUNNING = 53823
PERL5_CPAN_IS_RUNNING_IN_RECURSION = 60193,53823
PERL_CPAN_REPORTER_CONFIG = /home/cpansand/.cpanreporter/confignofail.ini
PERL_EXTUTILS_AUTOINSTALL = --defaultdeps
PERL_HTML_DISPLAY_CLASS = HTML::Display::Mozilla
SHELL = /usr/local/bin/zsh
TERM = screen
Perl special variables (and OS-specific diagnostics, for MSWin32):
$^X = /usr/local/bin/perl5.6.2
$UID/$EUID = 1023 / 1023
$GID = 1023 1023 1023
$EGID = 1023 1023 1023
Perl module toolchain versions installed:
Module Have
------------------- ---------
CPAN 1.92_61
Cwd 3.2701
ExtUtils::CBuilder n/a
ExtUtils::Command 1.13
ExtUtils::Install 1.41
ExtUtils::MakeMaker 6.36
ExtUtils::Manifest 1.51
ExtUtils::ParseXS n/a
File::Spec 3.2701
Module::Build 0.2808_01
Module::Signature n/a
Test::Harness 2.64
Test::More 0.72
YAML 0.39
YAML::Syck 0.99
version 0.76
--
Summary of my perl5 (revision 5.0 version 6 subversion 2) configuration:
Platform:
osname=freebsd, osvers=6.1-release, archname=i386-freebsd
uname='freebsd biokovo.herceg.de 6.1-release freebsd 6.1-release #0: sun may 7 04:32:43 utc 2006 root@opus.cse.buffalo.edu:usrobjusrsrcsysgeneric i386 '
config_args='-Dprefix=/usr/perl5.6.2 -D cc=ccache cc -Dgccansipedantic -Duse64bit -de -D hintfile=myfreebsd'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='ccache cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -mtune=athlon64 -pipe',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.4.4 [FreeBSD] 20050518', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ccache cc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lc -lcrypt -lutil
perllibs=-lm -lc -lcrypt -lutil
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-shared -L/usr/local/lib'