Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Created December 5, 2011 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taiyoh/1432635 to your computer and use it in GitHub Desktop.
Save taiyoh/1432635 to your computer and use it in GitHub Desktop.
--- a/lib/Archer/Plugin/Confirm.pm
+++ b/lib/Archer/Plugin/Confirm.pm
@@ -2,7 +2,7 @@ package Archer::Plugin::Confirm;
use strict;
use warnings;
use base qw/Archer::Plugin/;
-use IO::Prompt;
+use IO::Prompt::Simple;
sub run {
my ($self,) = @_;
@@ -15,7 +15,7 @@ sub run {
my $timeout = $self->{config}->{timeout} || 0;
my $latest_alarm = alarm $timeout;
- if ( IO::Prompt::prompt( $msg, '-yn' ) ) {
+ if ( prompt( $msg, { anyone => [qw/y n/] } ) ) {
alarm $latest_alarm;
$self->log(debug => "yes");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment