diff options
author | Gustav Eek <gustav@fripost.org> | 2011-11-18 19:34:10 +0100 |
---|---|---|
committer | Gustav Eek <gustav@fripost.org> | 2011-11-18 19:34:10 +0100 |
commit | 52a407f738d0c8e28087f27762f775f99ca51c01 (patch) | |
tree | 58d956b553bcb8a42991b1bdfa0b579041ff7e24 /lib/Fripost | |
parent | e14bd8eea4ad519e36a56dc868ed2e9effe1295e (diff) | |
parent | 446ae9bf00bb59c245a8045ee7ab8a9f73599d78 (diff) |
Merge branch 'master' of https://github.com/skangas/fripost-tools
Diffstat (limited to 'lib/Fripost')
-rwxr-xr-x | lib/Fripost/Prompt.pm | 8 |
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] "; |