aboutsummaryrefslogtreecommitdiff
path: root/lib/Sietima.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sietima.pm')
-rw-r--r--lib/Sietima.pm60
1 files changed, 19 insertions, 41 deletions
diff --git a/lib/Sietima.pm b/lib/Sietima.pm
index b40e9fc..e317147 100644
--- a/lib/Sietima.pm
+++ b/lib/Sietima.pm
@@ -44,54 +44,34 @@ consumes L<< C<MooX::Traits> >> to simplify composing roles:
These are the traits provided with the default distribution:
-=over
-
-=item L<< C<AvoidDups>|Sietima::Role::AvoidDups >>
-
+=for :list
+= L<< C<AvoidDups>|Sietima::Role::AvoidDups >>
prevents the sender from receiving copies of their own messages
-
-=item L<< C<Debounce>|Sietima::Role::Debounce >>
-
+= L<< C<Debounce>|Sietima::Role::Debounce >>
avoids mail-loops using a C<X-Been-There> header
-
-=item L<< C<Headers>|Sietima::Role::Headers >>
-
+= L<< C<Headers>|Sietima::Role::Headers >>
adds C<List-*> headers to all outgoing messages
-
-=item L<< C<NoMail>|Sietima::Role::NoMail >>
-
+= L<< C<NoMail>|Sietima::Role::NoMail >>
avoids sending messages to subscribers who don't want them
-
-=item L<< C<ReplyTo>|Sietima::Role::ReplyTo >>
-
+= L<< C<ReplyTo>|Sietima::Role::ReplyTo >>
optionally sets the C<Reply-To> header to the mailing list address
-
-=item L<< C<SubjectTag>|Sietima::Role::SubjectTag >>
-
+= L<< C<SubjectTag>|Sietima::Role::SubjectTag >>
prepends a C<[tag]> to the subject header of outgoing messages that
aren't already tagged
-
-=item L<< C<SubscriberOnly::Drop>|Sietima::Role::SubscriberOnly::Drop >>
-
+= L<< C<SubscriberOnly::Drop>|Sietima::Role::SubscriberOnly::Drop >>
silently drops all messages coming from addresses not subscribed to
the list
-
-=item L<< C<SubscriberOnly::Moderate>|Sietima::Role::SubscriberOnly::Moderate >>
-
+= L<< C<SubscriberOnly::Moderate>|Sietima::Role::SubscriberOnly::Moderate >>
holds messages coming from addresses not subscribed to the list for
moderation, and provides commands to manage the moderation queue
-=back
-
The only "configuration mechanism" currently supported is to
initialise a C<Sietima> object in your driver script, passing all the
needed values to the constructor. L<< C<Sietima::CmdLine> >> is the
recommended way of doing that: it adds command-line parsing capability
to Sietima.
-=head1 ATTRIBUTES
-
-=head2 C<return_path>
+=attr C<return_path>
A L<< C<Email::Address> >> instance, coerced from string if
necessary. This is the address that Sietima will send messages
@@ -106,7 +86,7 @@ has return_path => (
coerce => AddressFromStr,
);
-=head2 C<subscribers>
+=attr C<subscribers>
An array-ref of L<< C<Sietima::Subscriber> >> objects, defaults to the
empty array.
@@ -138,7 +118,7 @@ has subscribers => (
);
sub _build_subscribers { +[] }
-=head2 C<transport>
+=attr C<transport>
A L<< C<Email::Sender::Transport> >> instance, which will be used to
send messages. If not passed in, Sietima uses L<<
@@ -153,9 +133,7 @@ has transport => (
);
sub _build_transport { Email::Sender::Simple->default_transport }
-=head1 METHODS
-
-=head2 C<handle_mail_from_stdin>
+=method C<handle_mail_from_stdin>
$sietima->handle_mail_from_stdin();
@@ -173,7 +151,7 @@ sub handle_mail_from_stdin($self,@) {
return $self->handle_mail($incoming_mail);
}
-=head2 C<handle_mail>
+=method C<handle_mail>
$sietima->handle_mail($email_mime);
@@ -193,7 +171,7 @@ sub handle_mail($self,$incoming_mail) {
return;
}
-=head2 C<subscribers_to_send_to>
+=method C<subscribers_to_send_to>
my $subscribers_aref = $sietima->subscribers_to_send_to($email_mime);
@@ -213,7 +191,7 @@ sub subscribers_to_send_to($self,$incoming_mail) {
return $self->subscribers;
}
-=head2 C<munge_mail>
+=method C<munge_mail>
my @messages = $sietima->munge_mail($email_mime);
@@ -239,7 +217,7 @@ sub munge_mail($self,$incoming_mail) {
});
}
-=head2 C<send_message>
+=method C<send_message>
$sietima->send_message($sietima_message);
@@ -265,7 +243,7 @@ sub send_message($self,$outgoing_message) {
sub _trait_namespace { 'Sietima::Role' } ## no critic(ProhibitUnusedPrivateSubroutines)
-=head2 C<list_addresses>
+=method C<list_addresses>
my $addresses_href = $sietima->list_addresses;
@@ -286,7 +264,7 @@ sub list_addresses($self) {
};
}
-=head2 C<command_line_spec>
+=method C<command_line_spec>
my $app_spec_data = $sietima->command_line_spec;