1use strict;
2use warnings;
3package Dist::Zilla::App::Command::input;
4# ABSTRACT: demonstrate how input chrome works
5use Dist::Zilla::App -command;
6
7sub abstract { 'demonstrate chrome input methods' }
8
9sub opt_spec {
10}
11
12sub execute {
13  my ($self, $opt, $arg) = @_;
14
15  my $zilla = $self->zilla;
16
17  $zilla->log("beginning input tests");
18
19  for my $default (undef, 'y', 'n') {
20    my $yn = $zilla->chrome->prompt_yn(
21      "yes or no?",
22      defined($default) ? { default => $default } : ()
23    );
24
25    $zilla->log([ "yes or no: %s", $yn ]);
26  }
27
28  $zilla->chrome->prompt_any_key;
29  $zilla->chrome->prompt_any_key("smack one");
30}
31
321;
33