NAME
MojoX::Authentication::Model::Role::Creator;
SYNOPSIS
package Some::Class;
use Moo;
use constant DEFAULT_NAME => 'foobar';
with 'MojoX::Authentication::Model::Role::Creator';
sub create ($self, $config, %args) {
%args = $self->_create_args(DEFAULT_NAME, $config, %args);
...
}
...
DESCRIPTION
Role to ease merging of $config into %args, preserving the name key if present or using a default. There is only a private method _create_args that is supposed to be called inside the create method of relevant classes, so it's only of interest for anybody implementing new providers.
INTERFACE
_create_args
%args = $provider->_create_args($default_name, $config, %args);
This method is assumed to be called inside the create method for one of the provider implementations. See MojoX::Authentication::Model::Hash for an example of usage.
This is a private method and it's not meant to be called by clients of the object.
ANYTHING ELSE (INCLUDING AUTHOR, COPYRIGHT AND LICENSE)
See documentation for MojoX::Authentication.