1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
IO::Prompter version 0.005001
Prompt for, read, vet, chomp, and encapsulate input.
Like so:
use IO::Prompter;
while (prompt -num 'Enter a number') {
say "You entered: $_";
}
my $passwd
= prompt 'Enter your password', -echo=>'*';
my $selection
= prompt 'Choose wisely...', -menu => {
wealth => [ 'moderate', 'vast', 'incalculable' ],
health => [ 'hale', 'hearty', 'rude' ],
wisdom => [ 'cosmic', 'folk' ],
}, '>';
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
Alternatively, to install with Module::Build, you can use the following commands:
perl Build.PL
./Build
./Build test
./Build install
DEPENDENCIES
Requires Contextual::Return.
Works much better if Term::ReadKey is installed.
COPYRIGHT AND LICENCE
Copyright (C) 2009, Damian Conway
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
|