diff options
Diffstat (limited to 'lib')
-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] "; |