Created
December 5, 2011 07:02
-
-
Save taiyoh/1432635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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