NAME
Ask::API - an API to ask users things
SYNOPSIS
{
package Ask::AwesomeWidgets;
use Moo;
with 'Ask::API';
sub info {
my ($self, %arguments) = @_;
...
}
sub entry {
my ($self, %arguments) = @_;
...
}
}
DESCRIPTION
Ask::API
is a Moo role. This means that you can write your implementation as either a Moo or Moose class.
The only two methods that you absolutely must implement are info
and entry
.
Ask::API
provides default implementations of warning
, error
, question
, file_selection
, multiple_choice
and single_choice
methods, but they're not espcially good, so you probably want to implement most of those too.
There is not currently any mechanism to "register" your implementation with Ask so that Ask->detect
knows about it.
BUGS
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Ask.
SEE ALSO
Ask.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2012-2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.