diff options
Diffstat (limited to 'lib/Sietima/Role/WithAdmin.pm')
-rw-r--r-- | lib/Sietima/Role/WithAdmin.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Sietima/Role/WithAdmin.pm b/lib/Sietima/Role/WithAdmin.pm index 8293621..2781bf8 100644 --- a/lib/Sietima/Role/WithAdmin.pm +++ b/lib/Sietima/Role/WithAdmin.pm @@ -4,6 +4,35 @@ use Sietima::Policy; use Sietima::Types qw(Address AddressFromStr); use namespace::clean; +=head1 NAME + +Sietima::Role::WithAdmin - role for lists with an owner / admin + +=head1 SYNOPSIS + + my $sietima = Sietima->with_traits('WithAdmin')->new({ + %args, + admin => 'listmaster@example.com', + }); + +=head1 DESCRIPTION + +This role adds an L<< /C<admin> >> attribute, and exposes it via the +L<< C<list_addresses>|Sietima/list_addresses >> method. + +On its own, this role is not very useful, but other roles (like L<< +C<SubscriberOnly::Moderate>|Sietima::Role::SubscriberOnly::Moderate +>>) can have uses for an admin / owner address. + +=head1 ATTRIBUTES + +=head2 C<admin> + +Required instance of L<< C<Email::Address> >>, coercible from a +string. This is the address of the owner / admin of the list. + +=cut + has admin => ( is => 'ro', isa => Address, |