aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost
diff options
context:
space:
mode:
authorGustav Eek <gustav@fripost.org>2011-11-18 19:34:10 +0100
committerGustav Eek <gustav@fripost.org>2011-11-18 19:34:10 +0100
commit52a407f738d0c8e28087f27762f775f99ca51c01 (patch)
tree58d956b553bcb8a42991b1bdfa0b579041ff7e24 /lib/Fripost
parente14bd8eea4ad519e36a56dc868ed2e9effe1295e (diff)
parent446ae9bf00bb59c245a8045ee7ab8a9f73599d78 (diff)
Merge branch 'master' of https://github.com/skangas/fripost-tools
Diffstat (limited to 'lib/Fripost')
-rwxr-xr-xlib/Fripost/Prompt.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Fripost/Prompt.pm b/lib/Fripost/Prompt.pm
index 0a9d5c6..d90d42d 100755
--- a/lib/Fripost/Prompt.pm
+++ b/lib/Fripost/Prompt.pm
@@ -17,9 +17,15 @@ use Exporter;
use IO::Prompt;
use String::MkPasswd qw/mkpasswd/;
-our @EXPORT = qw(confirm_or_abort fix_username prompt_email prompt_password);
+our @EXPORT = qw(confirm confirm_or_abort fix_username prompt_email prompt_password);
our @ISA = qw(Exporter);
+sub confirm {
+ my ($msg) = @_;
+ $msg //= "Is this OK? [no will abort] ";
+ return prompt $msg, -ynt;
+}
+
sub confirm_or_abort {
my ($msg) = @_;
$msg //= "Is this OK? [no will abort] ";