diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-05-03 18:18:55 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-05-03 18:18:55 +0200 |
commit | b0460b1b8fb61569d20cbd4ac75ae6976bd34a92 (patch) | |
tree | a95c60c0f6705d73558e00b3afa3e0006dfb65a2 /lib | |
parent | eea26843500c7d12f0ee2e9e89d80953d5f7276f (diff) |
‘IO::Prompt’ is deprecacted; Migrating to ‘IO::Prompter’ (by the same author).
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Fripost/Password.pm | 4 | ||||
-rwxr-xr-x | lib/Fripost/Prompt.pm | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Fripost/Password.pm b/lib/Fripost/Password.pm index 53a10f7..fc1f7ce 100755 --- a/lib/Fripost/Password.pm +++ b/lib/Fripost/Password.pm @@ -33,9 +33,9 @@ our @ISA = qw(Exporter); # CRYPT - since it requires salt). # If `$salt' is `undef', the salt is automatically generated, using the # subroutine `&make_salt' below. -sub hash ($$$) { +sub hash { - my ($h, $salt, $pw) = @_; + my ($pw, $h, $salt) = @_; $h //= SHA1; # Treat the schemes that don't use Digest::.. separetely. diff --git a/lib/Fripost/Prompt.pm b/lib/Fripost/Prompt.pm index 95ea7ea..07a1c0b 100755 --- a/lib/Fripost/Prompt.pm +++ b/lib/Fripost/Prompt.pm @@ -14,7 +14,7 @@ our $VERSION = '0.01'; use Data::Dumper; use Email::Valid; use Exporter; -use IO::Prompt; +use IO::Prompter; use Fripost::Password qw/mkpasswd/; our @EXPORT = qw(confirm confirm_or_abort fix_username prompt_email prompt_password); @@ -23,13 +23,13 @@ our @ISA = qw(Exporter); sub confirm { my ($msg) = @_; $msg //= "Is this OK? [no will abort] "; - return prompt $msg, -ynt; + return prompt $msg, -yn; } sub confirm_or_abort { my ($msg) = @_; $msg //= "Is this OK? [no will abort] "; - my $confirmed = prompt $msg, -ynt; + my $confirmed = prompt $msg, -yn; unless ($confirmed) { say "User aborted"; exit 1; @@ -72,8 +72,8 @@ sub prompt_password { my $password; do { - $password = prompt $msg, -e => '*'; - my $confirm = prompt $msg2, -e => '*'; + $password = prompt $msg, -echo => '*'; + my $confirm = prompt $msg2, -echo => '*'; unless ($password eq $confirm) { undef $password; say "Passwords do not match"; |