aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2017-02-07 19:59:04 +0000
committerdakkar <dakkar@thenautilus.net>2017-02-07 19:59:04 +0000
commit4a90832ad9b1436dce84e3ac0d8cb67a8fb33102 (patch)
tree6ab7e449555ce75fef2fc5befe62cd88595cbbda
parentPOD for ::MailStore::FS (diff)
downloadSietima-4a90832ad9b1436dce84e3ac0d8cb67a8fb33102.tar.gz
Sietima-4a90832ad9b1436dce84e3ac0d8cb67a8fb33102.tar.bz2
Sietima-4a90832ad9b1436dce84e3ac0d8cb67a8fb33102.zip
use more Pod::Weaver
-rw-r--r--lib/Sietima.pm60
-rw-r--r--lib/Sietima/CmdLine.pm16
-rw-r--r--lib/Sietima/MailStore.pm14
-rw-r--r--lib/Sietima/MailStore/FS.pm10
-rw-r--r--lib/Sietima/Message.pm10
-rw-r--r--lib/Sietima/Role/AvoidDups.pm4
-rw-r--r--lib/Sietima/Role/Debounce.pm4
-rw-r--r--lib/Sietima/Role/Headers.pm8
-rw-r--r--lib/Sietima/Role/NoMail.pm4
-rw-r--r--lib/Sietima/Role/ReplyTo.pm8
-rw-r--r--lib/Sietima/Role/SubjectTag.pm8
-rw-r--r--lib/Sietima/Role/SubscriberOnly.pm12
-rw-r--r--lib/Sietima/Role/SubscriberOnly/Drop.pm4
-rw-r--r--lib/Sietima/Role/SubscriberOnly/Moderate.pm16
-rw-r--r--lib/Sietima/Role/WithMailStore.pm4
-rw-r--r--lib/Sietima/Role/WithOwner.pm4
-rw-r--r--lib/Sietima/Role/WithPostAddress.pm4
-rw-r--r--lib/Sietima/Runner.pm2
-rw-r--r--lib/Sietima/Subscriber.pm16
-rw-r--r--lib/Sietima/Types.pm18
-rw-r--r--weaver.ini9
21 files changed, 88 insertions, 147 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;
diff --git a/lib/Sietima/CmdLine.pm b/lib/Sietima/CmdLine.pm
index 98805f9..6c24834 100644
--- a/lib/Sietima/CmdLine.pm
+++ b/lib/Sietima/CmdLine.pm
@@ -28,9 +28,7 @@ use namespace::clean;
This class simplifies the creation of a L<< C<Sietima> >> object, and
uses L<< C<App::Spec> >> to provide a command-line interface to it.
-=head1 ATTRIBUTES
-
-=head2 C<sietima>
+=attr C<sietima>
Required, an instance of L<< C<Sietima> >>. You can either construct
it yourself, or use the L<simplified building provided by the
@@ -44,7 +42,7 @@ has sietima => (
isa => SietimaObj,
);
-=head2 C<extra_spec>
+=attr C<extra_spec>
Optional hashref. Used inside L<< /C<app_spec> >>. If you're not
familiar with L<< C<App::Spec> >>, you probably don't want to touch
@@ -58,9 +56,7 @@ has extra_spec => (
default => sub { +{} },
);
-=head1 METHODS
-
-=head2 C<new>
+=method C<new>
my $cmdline = Sietima::CmdLine->new({
sietima => Sietima->with_traits(qw(SubjectTag))->new({
@@ -96,7 +92,7 @@ sub BUILDARGS($class,@args) {
return $args;
}
-=head2 C<app_spec>
+=method C<app_spec>
Returns an instance of L<< C<App::Spec> >>, built from the
specification returned by calling L<<
@@ -121,12 +117,12 @@ sub _build_app_spec($self) {
});
}
-=head2 C<runner>
+=method C<runner>
Returns an instance of L<< C<Sietima::Runner> >>, built from the L<<
/C<app_spec> >>.
-=head2 C<run>
+=method C<run>
Delegates to the L<< /C<runner> >>'s L<< C<run>|App::Spec::Run/run >> method.
diff --git a/lib/Sietima/MailStore.pm b/lib/Sietima/MailStore.pm
index c529e3e..5e6fc7f 100644
--- a/lib/Sietima/MailStore.pm
+++ b/lib/Sietima/MailStore.pm
@@ -11,9 +11,7 @@ use namespace::clean;
This role defines the interface that all mail stores must adhere
to. It does not provide any implementation.
-=head1 REQUIRED METHODS
-
-=head2 C<store>
+=require C<store>
my $id = $ms->store($email_mime_object,@tags);
@@ -23,7 +21,7 @@ tags (which must be strings). Must return a unique identifier for the
stored message. It is acceptable if identical messages are
indistinguishable by the storage.
-=head2 C<retrieve_by_id>
+=require C<retrieve_by_id>
my $email_mime_object = $ms->retrieve_by_id($id);
@@ -34,7 +32,7 @@ C<Email::MIME> >> object).
If the message has been deleted, or the identifier is not recognised,
this method must return C<undef> in scalar context.
-=head2 C<retrieve_ids_by_tags>
+=require C<retrieve_ids_by_tags>
my @ids = $ms->retrieve_ids_by_tags(@tags)->@*;
@@ -57,7 +55,7 @@ For example:
$ms->retrieve_ids_by_tags('t1','t2') ==> [ $id3 ]
$ms->retrieve_ids_by_tags('t3') ==> [ ]
-=head2 C<retrieve_by_tags>
+=require C<retrieve_by_tags>
my @email_mime_objects = $ms->retrieve_by_tags(@tags)->@*;
@@ -73,7 +71,7 @@ return an arrayref of hashrefs. For example:
{ id => $id1, mail => $msg1 },
]
-=head2 C<remove>
+=require C<remove>
$ms->remove($id);
@@ -81,7 +79,7 @@ This method must remove the message corresponding to the given
identifier from the persistent storage. Removing a non-existent
message must succeed, and do nothing.
-=head2 C<clear>
+=require C<clear>
$ms->clear();
diff --git a/lib/Sietima/MailStore/FS.pm b/lib/Sietima/MailStore/FS.pm
index d34b388..fe41de4 100644
--- a/lib/Sietima/MailStore/FS.pm
+++ b/lib/Sietima/MailStore/FS.pm
@@ -59,7 +59,7 @@ sub BUILD($self,@) {
return;
}
-=head2 C<store>
+=method C<store>
my $id = $store->store($email_mime_object,@tags);
@@ -85,7 +85,7 @@ sub store($self,$mail,@tags) {
return $id;
}
-=head2 C<retrieve_by_id>
+=method C<retrieve_by_id>
my $email_mime_object = $store->retrieve_by_id($id);
@@ -106,7 +106,7 @@ sub retrieve_by_id($self,$id) {
return Email::MIME->new($msg_path->slurp_raw);
}
-=head2 C<retrieve_ids_by_tags>
+=method C<retrieve_ids_by_tags>
my @ids = $store->retrieve_ids_by_tags(@tags)->@*;
@@ -150,7 +150,7 @@ sub retrieve_ids_by_tags($self,@tags) {
return \@ret;
}
-=head2 C<retrieve_by_tags>
+=method C<retrieve_by_tags>
my @email_mime_objects = $store->retrieve_by_tags(@tags)->@*;
@@ -178,7 +178,7 @@ sub retrieve_by_tags($self,@tags) {
return \@ret;
}
-=head2 C<remove>
+=method C<remove>
$store->remove($id);
diff --git a/lib/Sietima/Message.pm b/lib/Sietima/Message.pm
index 30befdb..b0d82e6 100644
--- a/lib/Sietima/Message.pm
+++ b/lib/Sietima/Message.pm
@@ -34,7 +34,7 @@ C<Sietima::send_message>|Sietima/send_message >>.
All attributes are read-only and required.
-=head2 C<mail>
+=attr C<mail>
An L<< C<Email::MIME> >> object, representing the message.
@@ -46,7 +46,7 @@ has mail => (
required => 1,
);
-=head2 C<from>
+=attr C<from>
An L<< C<Email::Address> >> object, coercible from a string,
representing the sender.
@@ -60,7 +60,7 @@ has from => (
required => 1,
);
-=head2 C<to>
+=attr C<to>
An arrayref of L<< C<Sietima::Subscriber> >> objects, each coercible
from a string or an L<< C<Email::Address> >> object, representing the
@@ -81,9 +81,7 @@ has to => (
required => 1,
);
-=head1 METHODS
-
-=head2 C<envelope>
+=method C<envelope>
my %envelope = $message->envelope->%*;
diff --git a/lib/Sietima/Role/AvoidDups.pm b/lib/Sietima/Role/AvoidDups.pm
index c6a5cdd..e0a5bae 100644
--- a/lib/Sietima/Role/AvoidDups.pm
+++ b/lib/Sietima/Role/AvoidDups.pm
@@ -18,9 +18,7 @@ message to a subscriber, if that subscriber is already mentioned in
the C<To:> or C<Cc:> header fields, because they can be assumed to be
already receiving the message directly from the sender.
-=head1 MODIFIED METHODS
-
-=head2 C<subscribers_to_send_to>
+=modif C<subscribers_to_send_to>
Filters out subscribers that L<match|Sietima::Subscriber/match> the
addresses in the C<To:> or C<Cc:> headers of the incoming email.
diff --git a/lib/Sietima/Role/Debounce.pm b/lib/Sietima/Role/Debounce.pm
index b128422..e6bd087 100644
--- a/lib/Sietima/Role/Debounce.pm
+++ b/lib/Sietima/Role/Debounce.pm
@@ -18,9 +18,7 @@ have that same header. This prevents messages bounced by other
services from being looped between the mailing list and those other
services.
-=head1 MODIFIED METHODS
-
-=head2 C<munge_mail>
+=modif C<munge_mail>
If the incoming email contains our C<X-Been-There:> header, this
method will return an empty list (essentially dropping the message).
diff --git a/lib/Sietima/Role/Headers.pm b/lib/Sietima/Role/Headers.pm
index 320ab93..92a24f7 100644
--- a/lib/Sietima/Role/Headers.pm
+++ b/lib/Sietima/Role/Headers.pm
@@ -34,9 +34,7 @@ C<Email::Address> >> objects (in which case the header will have a
C<mailto:> URI as value) or strings (which will be used literally for
the value of the header).
-=head1 ATTRIBUTES
-
-=head2 C<name>
+=attr C<name>
Optional string, the name of the mailing list. If this attribute is
set, a C<List-Id:> header will be added, with a value built out of the
@@ -88,9 +86,7 @@ sub _add_headers_to($self,$message) {
return;
}
-=head1 MODIFIED METHODS
-
-=head2 C<munge_mail>
+=modif C<munge_mail>
This method adds list-management headers to each message returned by
the original method.
diff --git a/lib/Sietima/Role/NoMail.pm b/lib/Sietima/Role/NoMail.pm
index 2d129a8..10071d6 100644
--- a/lib/Sietima/Role/NoMail.pm
+++ b/lib/Sietima/Role/NoMail.pm
@@ -22,9 +22,7 @@ A L<< C<Sietima> >> list with this role applied will not send messages
to subscribers that have the C<wants_mail> preference set to a false
value.
-=head1 MODIFIED METHODS
-
-=head2 C<subscribers_to_send_to>
+=modif C<subscribers_to_send_to>
Filters out subscribers that have the C<wants_mail> preference set to
a false value.
diff --git a/lib/Sietima/Role/ReplyTo.pm b/lib/Sietima/Role/ReplyTo.pm
index 1e10420..6b21f20 100644
--- a/lib/Sietima/Role/ReplyTo.pm
+++ b/lib/Sietima/Role/ReplyTo.pm
@@ -40,9 +40,7 @@ C<WithPostAddress>|Sietima::Role::WithPostAddress >>.
with 'Sietima::Role::WithPostAddress';
-=head1 ATTRIBUTES
-
-=head2 C<munge_reply_to>
+=attr C<munge_reply_to>
Optional boolean, defaults to false. If set to a true value, all
messages will have their C<Reply-To:> header set to the value of the
@@ -57,9 +55,7 @@ has munge_reply_to => (
default => 0,
);
-=head1 MODIFIED METHODS
-
-=head2 C<munge_mail>
+=modif C<munge_mail>
For each message returned by the original method, this method
partitions the subscribers, who are recipients of the message,
diff --git a/lib/Sietima/Role/SubjectTag.pm b/lib/Sietima/Role/SubjectTag.pm
index dd72562..7602405 100644
--- a/lib/Sietima/Role/SubjectTag.pm
+++ b/lib/Sietima/Role/SubjectTag.pm
@@ -19,9 +19,7 @@ use namespace::clean;
A L<< C<Sietima> >> list with this role applied will prepend the given
tag to every outgoing message's C<Subject:> header.
-=head1 ATTRIBUTES
-
-=head2 C<subject_tag>
+=attr C<subject_tag>
Required string. This string, enclosed by square brackets, will be
prepended to the C<Subject:> header of outgoing messages. For example,
@@ -40,9 +38,7 @@ has subject_tag => (
required => 1,
);
-=head1 MODIFIED METHODS
-
-=head2 C<munge_mail>
+=modif C<munge_mail>
The subject of the incoming email is modified to add the tag (unless
it's already there). The email is then processed normally.
diff --git a/lib/Sietima/Role/SubscriberOnly.pm b/lib/Sietima/Role/SubscriberOnly.pm
index d2edf6b..6524d39 100644
--- a/lib/Sietima/Role/SubscriberOnly.pm
+++ b/lib/Sietima/Role/SubscriberOnly.pm
@@ -29,9 +29,7 @@ with messages from non-subscribers.
See L<< C<Sietima::Role::SubscriberOnly::Drop> >> and L<<
C<Sietima::Role::SubscriberOnly::Moderate> >> for useable roles.
-=head1 REQUIRED METHODS
-
-=head2 C<munge_mail_from_non_subscriber>
+=require C<munge_mail_from_non_subscriber>
sub munge_mail_from_non_subscriber($self,$mail) { ... }
@@ -48,9 +46,7 @@ requires 'munge_mail_from_non_subscriber';
our $let_it_pass=0; ## no critic(ProhibitPackageVars)
-=head1 MODIFIED METHODS
-
-=head2 C<munge_mail>
+=modif C<munge_mail>
If the incoming email's C<From:> header contains an address that
L<matches|Sietima::Subscriber/match> any of the subscribers, the email
@@ -70,9 +66,7 @@ around munge_mail => sub ($orig,$self,$mail) {
}
};
-=head1 METHODS
-
-=head2 C<ignoring_subscriberonly>
+=method C<ignoring_subscriberonly>
$sietima->ignoring_subscriberonly(sub($s) {
$s->handle_mail($mail);
diff --git a/lib/Sietima/Role/SubscriberOnly/Drop.pm b/lib/Sietima/Role/SubscriberOnly/Drop.pm
index dea742b..d9de94e 100644
--- a/lib/Sietima/Role/SubscriberOnly/Drop.pm
+++ b/lib/Sietima/Role/SubscriberOnly/Drop.pm
@@ -25,9 +25,7 @@ C<SubscribersOnly>|Sietima::Role::SubscriberOnly >>.
with 'Sietima::Role::SubscriberOnly';
-=head1 METHODS
-
-=head2 C<munge_mail_from_non_subscriber>
+=method C<munge_mail_from_non_subscriber>
Does nothing, returns an empty list.
diff --git a/lib/Sietima/Role/SubscriberOnly/Moderate.pm b/lib/Sietima/Role/SubscriberOnly/Moderate.pm
index 13bc541..c4d62c9 100644
--- a/lib/Sietima/Role/SubscriberOnly/Moderate.pm
+++ b/lib/Sietima/Role/SubscriberOnly/Moderate.pm
@@ -38,9 +38,7 @@ with 'Sietima::Role::SubscriberOnly',
'Sietima::Role::WithMailStore',
'Sietima::Role::WithOwner';
-=head1 METHODS
-
-=head2 C<munge_mail_from_non_subscriber>
+=method C<munge_mail_from_non_subscriber>
L<Stores|Sietima::MailStore/store> the email with the C<moderation>
tag, and forwards it to the L<list
@@ -69,7 +67,7 @@ sub munge_mail_from_non_subscriber ($self,$mail) {
return;
}
-=head2 C<resume>
+=method C<resume>
$sietima->resume($mail_id);
@@ -89,7 +87,7 @@ sub resume ($self,$mail_id) {
$self->mail_store->remove($mail_id);
}
-=head2 C<drop>
+=method C<drop>
$sietima->drop($mail_id);
@@ -102,7 +100,7 @@ sub drop ($self,$mail_id) {
$self->mail_store->remove($mail_id);
}
-=head2 C<list_mails_in_moderation_queue>
+=method C<list_mails_in_moderation_queue>
$sietima->list_mails_in_moderation_queue($sietima_runner);
@@ -129,7 +127,7 @@ sub list_mails_in_moderation_queue ($self,$runner,@) {
}
}
-=head2 C<show_mail_from_moderation_queue>
+=method C<show_mail_from_moderation_queue>
$sietima->show_mail_from_moderation_queue($sietima_runner);
@@ -149,9 +147,7 @@ sub show_mail_from_moderation_queue ($self,$runner,@) {
$runner->out($mail->as_string =~ s{\r\n}{\n}gr);
}
-=head1 MODIFIED METHODS
-
-=head2 C<command_line_spec>
+=modif C<command_line_spec>
This method adds the following sub-commands for the command line:
diff --git a/lib/Sietima/Role/WithMailStore.pm b/lib/Sietima/Role/WithMailStore.pm
index e139965..7ca4b4e 100644
--- a/lib/Sietima/Role/WithMailStore.pm
+++ b/lib/Sietima/Role/WithMailStore.pm
@@ -25,9 +25,7 @@ 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 object that can persistently store messages.
-=head1 ATTRIBUTES
-
-=head2 C<mail_store>
+=attr C<mail_store>
Required instance of an object that consumes the L<<
C<Sietima::MailStore> >> role. Instead of passing an instance, you can
diff --git a/lib/Sietima/Role/WithOwner.pm b/lib/Sietima/Role/WithOwner.pm
index 0677f90..5a11d05 100644
--- a/lib/Sietima/Role/WithOwner.pm
+++ b/lib/Sietima/Role/WithOwner.pm
@@ -23,9 +23,7 @@ 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 owner address.
-=head1 ATTRIBUTES
-
-=head2 C<owner>
+=attr C<owner>
Required instance of L<< C<Email::Address> >>, coercible from a
string. This is the address of the owner of the list.
diff --git a/lib/Sietima/Role/WithPostAddress.pm b/lib/Sietima/Role/WithPostAddress.pm
index daa483a..333c5e3 100644
--- a/lib/Sietima/Role/WithPostAddress.pm
+++ b/lib/Sietima/Role/WithPostAddress.pm
@@ -24,9 +24,7 @@ On its own, this role is not very useful, but other roles (like L<<
C<ReplyTo>|Sietima::Role::ReplyTo >>) can have uses for a post
address.
-=head1 ATTRIBUTES
-
-=head2 C<post_address>
+=attr C<post_address>
An L<< C<Email::Address> >> object, defaults to the value of the L<<
C<return_path>|Sietima/return_path >> attribute. This is the address
diff --git a/lib/Sietima/Runner.pm b/lib/Sietima/Runner.pm
index d18f936..ca64348 100644
--- a/lib/Sietima/Runner.pm
+++ b/lib/Sietima/Runner.pm
@@ -16,6 +16,8 @@ itself to execute the built-in commands, instead of delegating to the
C<cmd> object (in our case, a C<Sietima> instance) which would
delegate back via L<< C<App::Spec::Run::Cmd> >>.
+=for Pod::Coverage run_op
+
=cut
extends 'App::Spec::Run';
diff --git a/lib/Sietima/Subscriber.pm b/lib/Sietima/Subscriber.pm
index 4782e85..b62e44f 100644
--- a/lib/Sietima/Subscriber.pm
+++ b/lib/Sietima/Subscriber.pm
@@ -20,7 +20,7 @@ subscriber, together with possible aliases and preferences.
All attributes are read-only.
-=head2 C<primary>
+=attr C<primary>
Required L<< C<Email::Address> >> object, coercible from a string.
@@ -37,7 +37,7 @@ has primary => (
handles => [qw(address name original)],
);
-=head2 C<aliases>
+=attr C<aliases>
Arrayref of L<< C<Email::Address> >> objects, each coercible from a
string. Defaults to an empty arrayref.
@@ -61,7 +61,7 @@ has aliases => (
);
sub _build_aliases { +[] }
-=head2 C<prefs>
+=attr C<prefs>
A hashref. Various preferences that may be interpreted by Sietima
roles. Defaults to an empty hashref.
@@ -74,9 +74,7 @@ has prefs => (
default => sub { +{} },
);
-=head1 METHODS
-
-=head2 C<match>
+=method C<match>
if ($subscriber->match($address)) { ... }
@@ -99,11 +97,11 @@ sub match {
$self->primary, $self->aliases->@*;
}
-=head2 C<address>
+=method C<address>
-=head2 C<name>
+=method C<name>
-=head2 C<original>
+=method C<original>
These methods delegate to L<< C<Email::Address> >>'s methods of the
same name, invoked on the L<primary address|/primary>.
diff --git a/lib/Sietima/Types.pm b/lib/Sietima/Types.pm
index e7a576d..9f052e3 100644
--- a/lib/Sietima/Types.pm
+++ b/lib/Sietima/Types.pm
@@ -20,9 +20,7 @@ use Type::Library
This module is a L<< C<Type::Library> >>. It declares a few type
constraints nad coercions.
-=head1 TYPES
-
-=head2 C<SietimaObj>
+=type C<SietimaObj>
An instance of L<< C<Sietima> >>.
@@ -30,7 +28,7 @@ An instance of L<< C<Sietima> >>.
class_type SietimaObj, { class => 'Sietima' };
-=head2 C<EmailMIME>
+=type C<EmailMIME>
An instance of L<< C<Email::MIME> >>.
@@ -38,7 +36,7 @@ An instance of L<< C<Email::MIME> >>.
class_type EmailMIME, { class => 'Email::MIME' };
-=head2 C<Transport>
+=type C<Transport>
An object that consumes the role L<< C<Email::Sender::Transport> >>.
@@ -46,7 +44,7 @@ An object that consumes the role L<< C<Email::Sender::Transport> >>.
role_type Transport, { role => 'Email::Sender::Transport' };
-=head2 C<MailStore>
+=type C<MailStore>
An object that consumes the role L<< C<Sietima::MailStore> >>.
@@ -79,7 +77,7 @@ declare_coercion MailStoreFromHashRef,
q{ require Module::Runtime; } .
q{ Module::Runtime::use_module(delete $_->{class})->new($_); };
-=head2 C<Address>
+=type C<Address>
An instance of L<< C<Email::Address> >>.
@@ -104,7 +102,7 @@ declare_coercion AddressFromStr,
to_type Address, from Str,
q{ (Email::Address->parse($_))[0] };
-=head2 C<TagName>
+=type C<TagName>
A string composed exclusively of "word" (C</\w/>) characters. Used by
L<mail stores|Sietima::MailStore> to tag messages.
@@ -118,7 +116,7 @@ declare TagName, as Str,
.qq{ && ($varname =~/\\A\\w+\\z/) };
};
-=head2 C<Message>
+=type C<Message>
An instance of L<< C<Sietima::Message> >>.
@@ -126,7 +124,7 @@ An instance of L<< C<Sietima::Message> >>.
class_type Message, { class => 'Sietima::Message' };
-=head2 C<Subscriber>
+=type C<Subscriber>
An instance of L<< C<Sietima::Subscriber> >>.
diff --git a/weaver.ini b/weaver.ini
index 4cf1cae..f4c9077 100644
--- a/weaver.ini
+++ b/weaver.ini
@@ -14,12 +14,21 @@
[Collect / ATTRIBUTES]
command = attr
+[Collect / REQUIRED METHODS]
+command = require
+
[Collect / METHODS]
command = method
+[Collect / MODIFIED METHODS]
+command = modif
+
[Collect / FUNCTIONS]
command = func
+[Collect / TYPES]
+command = type
+
[Leftovers]
[Region / postlude]