Sietima::Types - type library for Sietima
version 1.1.2
This module is a Type::Library. It declares a few type constraints nad coercions.
Type::Library
SietimaObj
An instance of Sietima.
Sietima
EmailMIME
An instance of Email::MIME.
Email::MIME
Transport
An object that consumes the role Email::Sender::Transport.
Email::Sender::Transport
MailStore
An object that consumes the role Sietima::MailStore.
Sietima::MailStore
Coercions:
MailStoreFromHashRef
has store => ( isa => MailStore->plus_coercions(MailStoreFromHashRef) );
Using this coercion, a hashref of the form:
{ class => 'Some::Store::Class', %constructor_args, }
will be converted into an instance of Some::Store::Class built with the %constructor_args.
Some::Store::Class
%constructor_args
Address
An instance of Email::Address.
Email::Address
AddressFromStr
has address => ( isa => Address->plus_coercions(AddressFromStr) );
Using this coercion, a string will be parsed into an Email::Address. If the string contains more than one address, only the first one will be used.
TagName
A string composed exclusively of "word" (/\w/) characters. Used by mail stores to tag messages.
/\w/
Message
An instance of Sietima::Message.
Sietima::Message
Subscriber
An instance of Sietima::Subscriber.
Sietima::Subscriber
SubscriberFromAddress
has sub => ( isa => Subscriber->plus_coercions(SubscriberFromAddress) );
Using this coercion, an Email::Address will be converted into a subscriber that has that address as its primary.
SubscriberFromStr
has sub => ( isa => Subscriber->plus_coercions(SubscriberFromStr) );
Using this coercion, a string will be converted into a subscriber that has the first address parsed from that string as its primary.
SubscriberFromHashRef
has sub => ( isa => Subscriber->plus_coercions(SubscriberFromHashRef) );
Using this coercion, a hashref will be converted into a subscriber by passing it to the constructor.
Gianni Ceccarelli <dakkar@thenautilus.net>
This software is copyright (c) 2023 by Gianni Ceccarelli <dakkar@thenautilus.net>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Sietima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sietima
CPAN shell
perl -MCPAN -e shell install Sietima
For more information on module installation, please visit the detailed CPAN module installation guide.