From 4a90832ad9b1436dce84e3ac0d8cb67a8fb33102 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 7 Feb 2017 19:59:04 +0000 Subject: use more Pod::Weaver --- lib/Sietima.pm | 60 +++++++++++++++++++--------------------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) (limited to 'lib/Sietima.pm') 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 >> to simplify composing roles: These are the traits provided with the default distribution: -=over - -=item L<< C|Sietima::Role::AvoidDups >> - +=for :list += L<< C|Sietima::Role::AvoidDups >> prevents the sender from receiving copies of their own messages - -=item L<< C|Sietima::Role::Debounce >> - += L<< C|Sietima::Role::Debounce >> avoids mail-loops using a C header - -=item L<< C|Sietima::Role::Headers >> - += L<< C|Sietima::Role::Headers >> adds C headers to all outgoing messages - -=item L<< C|Sietima::Role::NoMail >> - += L<< C|Sietima::Role::NoMail >> avoids sending messages to subscribers who don't want them - -=item L<< C|Sietima::Role::ReplyTo >> - += L<< C|Sietima::Role::ReplyTo >> optionally sets the C header to the mailing list address - -=item L<< C|Sietima::Role::SubjectTag >> - += L<< C|Sietima::Role::SubjectTag >> prepends a C<[tag]> to the subject header of outgoing messages that aren't already tagged - -=item L<< C|Sietima::Role::SubscriberOnly::Drop >> - += L<< C|Sietima::Role::SubscriberOnly::Drop >> silently drops all messages coming from addresses not subscribed to the list - -=item L<< C|Sietima::Role::SubscriberOnly::Moderate >> - += L<< C|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 object in your driver script, passing all the needed values to the constructor. L<< C >> is the recommended way of doing that: it adds command-line parsing capability to Sietima. -=head1 ATTRIBUTES - -=head2 C +=attr C A L<< C >> 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 +=attr C An array-ref of L<< C >> objects, defaults to the empty array. @@ -138,7 +118,7 @@ has subscribers => ( ); sub _build_subscribers { +[] } -=head2 C +=attr C A L<< C >> 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 +=method C $sietima->handle_mail_from_stdin(); @@ -173,7 +151,7 @@ sub handle_mail_from_stdin($self,@) { return $self->handle_mail($incoming_mail); } -=head2 C +=method C $sietima->handle_mail($email_mime); @@ -193,7 +171,7 @@ sub handle_mail($self,$incoming_mail) { return; } -=head2 C +=method C 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 +=method C my @messages = $sietima->munge_mail($email_mime); @@ -239,7 +217,7 @@ sub munge_mail($self,$incoming_mail) { }); } -=head2 C +=method C $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 +=method C my $addresses_href = $sietima->list_addresses; @@ -286,7 +264,7 @@ sub list_addresses($self) { }; } -=head2 C +=method C my $app_spec_data = $sietima->command_line_spec; -- cgit v1.2.3