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.

Methods used during detection are is_usable which is called as an object method, and should return a boolean indicating its usability (for example, if STDIN is not connected to a terminal, Ask::STDIO returns false), and quality which is called as a class method and should return a number between 0 and 100, 100 being a high-quality backend, 0 being low-quality.

Ask->detect returns the highest quality module that it can load, instantiate and claims to be usable.