| MooseX-Types-Authen-Passphrase documentation | view source | Contained in the MooseX-Types-Authen-Passphrase distribution. |
MooseX::Types::Authen::Passphrase - Authen::Passphrase type constraint and coercions
package User;
use Moose;
use MooseX::Types::Authen::Passphrase qw(Passphrase);
has pass => (
isa => Passphrase,
coerce => 1,
handles => { check_password => "match" },
);
User->new( pass => undef ); # Authen::Passphrase::RejectAll
my $u = User->new( pass => "{SSHA}ixZcpJbwT507Ch1IRB0KjajkjGZUMzX8gA==" );
$u->check_password("foo"); # great success
User->new( pass => Authen::Passphrase::Clear->new("foo") ); # clear text is not coerced by default
This MooseX::Types library provides string coercions for the Authen::Passphrase family of classes.
Authen::PassphraseThis is defined as a class type
The following coercions are defined
UndefReturns Authen::Passphrase::RejectAll
StrParses using from_rfc2307 if the string begins with a {, or using
from_crypt otherwise.
This module is maintained using Darcs. You can get the latest version from
http://nothingmuch.woobling.org/code, and use darcs send to commit
changes.
Yuval Kogman <nothingmuch@woobling.org>
Copyright (c) 2008 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| MooseX-Types-Authen-Passphrase documentation | view source | Contained in the MooseX-Types-Authen-Passphrase distribution. |