From 5dd624746164999e812fb2648fea1991c0f3e8e1 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 16 Mar 2017 19:12:27 +0000 Subject: updated presentation --- docs/presentation/sietima.html | 104 +++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 60 deletions(-) diff --git a/docs/presentation/sietima.html b/docs/presentation/sietima.html index 6b82e72..3f032f9 100644 --- a/docs/presentation/sietima.html +++ b/docs/presentation/sietima.html @@ -3,6 +3,15 @@ + Sietima — a minimalist MLM @@ -31,7 +40,7 @@

Class::DBI

-

no Moo

+

no Moo(?:se)?

Perl 5.8

@@ -96,8 +113,7 @@ sub munge_mail($self,$incoming_mail) {

minimal spec in base class

-

-sub command_line_spec($self) {
+            
sub command_line_spec($self) {
  return {
   name => 'sietima',
   title => 'a simple mailing list manager',
@@ -108,70 +124,38 @@ sub command_line_spec($self) {
    },
   },
  };
-}
-            
+}

enriched by plugins

-

-around command_line_spec => sub ($orig,$self) {
+            
around command_line_spec => sub ($orig,$self) {
  my $spec = $self->$orig();
-
- my $list_mail_ids = sub ($self,$runner,$args) {
-  $self->mail_store->retrieve_ids_by_tags('moderation');
- };
-
- my $with_mail_id = sub($cmd) { return (
-  summary => "$cmd the given mail, currently held for moderation",
+ $spec->{subcommands}{'show-held'} = {
+  op => 'show_mail_from_moderation_queue',
   parameters => [ {
    name => 'mail-id', required => 1,
-   summary => "id of the mail to $cmd",
-   completion => { op => $list_mail_ids },
+   completion => { op => sub ($self,$runner,$args) {
+     $self->mail_store->retrieve_ids_by_tags('moderation');
+    } },
   } ],
- ) };
-
- $spec->{subcommands}{'list-held'} = {
-  op => 'list_mails_in_moderation_queue',
-  summary => 'list all mails currently held for moderation',
- };
- $spec->{subcommands}{'show-held'} = {
-  op => 'show_mail_from_moderation_queue',
-  $with_mail_id->('show'),
- };
- $spec->{subcommands}{'resume-held'} = {
-  op => sub ($self,$runner,$args) {
-   $self->resume($runner->parameters->{'mail-id'});
-  },
-  $with_mail_id->('resume'),
- };
- $spec->{subcommands}{'drop-held'} = {
-  op => sub ($self,$runner,$args) {
-   $self->drop($runner->parameters->{'mail-id'});
-  },
-  $with_mail_id->('drop'),
  };
-
+ # etc etc
  return $spec;
-};
-            
+};
-

-$ sietima-test <TAB>
+            
$ sietima-test TAB
 drop-held   -- drop the given mail, currently held for moderation
 help        -- Show command help
 list-held   -- list all mails currently held for moderation
 resume-held -- resume the given mail, currently held for moderation
 send        -- send email from STDIN
-show-held   -- show the given mail, currently held for moderation
-            
+show-held -- show the given mail, currently held for moderation
-

-$ sietima-test resume-held <TAB>
+            
$ sietima-test show-held TAB
 0f0571203ef5ee2f786b7f7f2832093ed4c34fe8
-4d43ee7a2a17457606c07475b14054839fad9b7e
-            
+4d43ee7a2a17457606c07475b14054839fad9b7e
@@ -180,7 +164,7 @@ $ sietima-test resume-held <TAB>

all my lists now run with Sietima

-

coming soon to a CPAN near you

+

on CPAN now

-- cgit v1.2.3