6 my $term = Term
::ReadLine
->new('brand');
8 my $reply = $term->get_reply(
9 prompt
=> 'What is your favourite colour?',
10 choices
=> [qw
|blue red green
|],
14 my $bool = $term->ask_yn(
15 prompt
=> 'Do you like cookies?',
20 my $string = q
[some_command
-option
--no-foo
--quux
='this thing'];
22 my ($options,$munged_input) = $term->parse_options($string);
25 ### don't have Term::UI issue warnings -- default is '1'
26 $Term::UI
::VERBOSE
= 0;
28 ### always pick the default (good for non-interactive terms)
30 $Term::UI
::AUTOREPLY
= 1;
32 ### Retrieve the entire session as a printable string:
33 $hist = Term
::UI
::History
->history_as_string;
34 $hist = $term->history_as_string;
This page took 0.347779 seconds and 4 git commands to generate.