=head1 NAME

IO::Prompt -- Interactive validating terminal prompt


=head1 VERSION

This document describes IO::Prompt version 0.0


=head1 SYNOPSIS

    use IO::Prompt;

    my $n = ask('How many bananas?',7);
    say "You said $n bananas";

See F<example.p6> and F<lib/IO/Prompt.pm> for more
examples of usage.

=head1 DESCRIPTION

This is a generic module for interactive prompting
from the console. You can install it with proto:

    $ cd ~/devel
    $ git clone git://github.com/masak/proto.git
    $ cd proto
    $ ./proto
    $ ./proto install io-prompt
    $ cd ../io-prompt 

    # I assume you have perl6 (rakudo) in your path

    $ PERL6LIB=../proto/lib perl6 Configure.p6
    $ make test
    $ PERL6LIB=lib perl6 example.p6


=head1 FUNCTIONAL INTERFACE

The funtional interface is exported by default.

=over 4

=item B<ask>

=item B<asker>

=back


=head1 METHODS

=over 4

=item B<ask>

=item B<ask_yn>

=item B<ask_int>

=item B<ask_num>

=item B<ask_str>

=back


=head1 PRIVATE METHODS AND ATTRIBUTES

All user IO is done tru these methods. You can override these
methods to create a testable version of the module.

=over 4

=item B<do_prompt>

=item B<do_say>

=back


The default options can be set in the object constructor.

=over 4

=item B<message>

=item B<default>

=item B<type>

=back


=head1 CLASS ATTRIBUTES

You can override these attributes to create a localization
for this module.

=over 4

=item B<lang_prompt_Yn>

=item B<lang_prompt_yN>

=item B<lang_prompt_yn>

=item B<lang_prompt_yn_retry>

=item B<lang_prompt_match_y>

=item B<lang_prompt_match_n>

=item B<lang_prompt_int>

=item B<lang_prompt_int_retry>

=item B<lang_prompt_num>

=item B<lang_prompt_num_retry>

=item B<lang_prompt_str>

=item B<lang_prompt_str_retry>

=back


=head1 CONFIGURATION AND ENVIRONMENT

IO::Prompt requires no configuration files or environment variables.


=head1 DEPENDENCIES

Requires no external modules. Tested and built with Rakudo Perl 6,
revision 38379 built on parrot 1.1.0-devel.


=head1 AUTHOR

Panu Ervamaa  C<< <pnu@cpan.org> >>


=head1 LICENCE AND COPYRIGHT

Copyright (c) 2009, Panu Ervamaa C<< <pnu@cpan.org> >>.
All rights reserved.

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


=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
