use parent qw/Exporter/;
use subs qw/OK HTTP_UNAUTHORIZED/;
-our $VERSION = 0.002001;
+our $VERSION = 0.002002;
use constant USER_REGEX => qr/^\w{2,20}$/pas;
use constant PASSPHRASE_VERSION => 1;
my $conf=LoadFile "$rootdir/$user.yml";
## no critic (RequireCarping)
- die BAD_PASSWORD unless keys $conf; # Empty hash means no such user
+ die BAD_PASSWORD unless keys %$conf; # Empty hash means no such user
die BAD_PASSWORD unless Authen::Passphrase->from_rfc2307($conf->{passphrase})->match($pass);
## use critic
pwset $user, $pass if $conf->{passphrase_version} < PASSPHRASE_VERSION
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2013 by Marius Gavrilescu
+Copyright (C) 2013-2015 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.2 or,