Data-Transpose
view release on metacpan or search on metacpan
lib/Data/Transpose/PasswordPolicy.pm view on Meta::CPAN
our $VERSION = '0.02';
=head1 NAME
Data::Transpose::PasswordPolicy - Perl extension to enforce password policy
=head1 SYNOPSIS
use Data::Transpose::PasswordPolicy;
my %credentials = (username => "marco",
password => "My.very.very.5strong.pzwd"
);
my $pv = Data::Transpose::PasswordPolicy->new(\%credentials)
if (my $password = $pv->is_valid) {
print "$password is OK";
}
else {
die $pv->error
}
lib/Data/Transpose/PasswordPolicy.pm view on Meta::CPAN
have some minimum standards, and could be used on web services to stop
users to set trivial password (without keeping the server busy for
seconds while we check it). Nothing more.
=cut
=head1 METHODS
=cut
=head2 new(%credentials)
Create a new Data::Transpose::PasswordPolicy object using the
credentials provided to the constructor.
=cut
has username => (is => 'rw',
isa => Str);
has password => (is => 'rw',
isa => Str);
around password => \&_strip_space_on_around;
( run in 0.426 second using v1.01-cache-2.11-cpan-4d50c553e7e )