From 98b6d1ba27fa2a2e1434e1fecd3479a2b4903fe7 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 16 Mar 2017 17:45:56 +0000 Subject: Dzil-build release 1.0.0 (from 9f1fc6d on master) --- docs/presentation/css | 1 - docs/presentation/css2 | 1 - docs/presentation/highlight.js | 1 - docs/presentation/js | 1 - docs/presentation/lib | 1 - docs/presentation/plugin | 1 - docs/presentation/reveal.js | 1 - docs/presentation/sietima.html | 221 ----------------------------------------- 8 files changed, 228 deletions(-) delete mode 120000 docs/presentation/css delete mode 120000 docs/presentation/css2 delete mode 160000 docs/presentation/highlight.js delete mode 120000 docs/presentation/js delete mode 120000 docs/presentation/lib delete mode 120000 docs/presentation/plugin delete mode 160000 docs/presentation/reveal.js delete mode 100644 docs/presentation/sietima.html (limited to 'docs/presentation') diff --git a/docs/presentation/css b/docs/presentation/css deleted file mode 120000 index e95a0e7..0000000 --- a/docs/presentation/css +++ /dev/null @@ -1 +0,0 @@ -reveal.js/css \ No newline at end of file diff --git a/docs/presentation/css2 b/docs/presentation/css2 deleted file mode 120000 index 0ca84e4..0000000 --- a/docs/presentation/css2 +++ /dev/null @@ -1 +0,0 @@ -highlight.js/src/styles \ No newline at end of file diff --git a/docs/presentation/highlight.js b/docs/presentation/highlight.js deleted file mode 160000 index ac3f2db..0000000 --- a/docs/presentation/highlight.js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ac3f2db5e434f6344d226d57d7e49290201696ca diff --git a/docs/presentation/js b/docs/presentation/js deleted file mode 120000 index ebce293..0000000 --- a/docs/presentation/js +++ /dev/null @@ -1 +0,0 @@ -reveal.js/js \ No newline at end of file diff --git a/docs/presentation/lib b/docs/presentation/lib deleted file mode 120000 index 892bcc7..0000000 --- a/docs/presentation/lib +++ /dev/null @@ -1 +0,0 @@ -reveal.js/lib \ No newline at end of file diff --git a/docs/presentation/plugin b/docs/presentation/plugin deleted file mode 120000 index 426257b..0000000 --- a/docs/presentation/plugin +++ /dev/null @@ -1 +0,0 @@ -reveal.js/plugin \ No newline at end of file diff --git a/docs/presentation/reveal.js b/docs/presentation/reveal.js deleted file mode 160000 index a349ff4..0000000 --- a/docs/presentation/reveal.js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a349ff43c58c23f9c837b8ea9b5fc7d4761b8de3 diff --git a/docs/presentation/sietima.html b/docs/presentation/sietima.html deleted file mode 100644 index 6b82e72..0000000 --- a/docs/presentation/sietima.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Sietima — a minimalist MLM - - -
-
-
-

Sietima — a minimalist MLM

-

Author: dakkar <dakkar@thenautilus.net>

-

Date: 2016-08-08

-
-
-

A bit of history

-
-

Siesta

- -
-
-

written in 2003

-
-
-

14 years ago

-
-
-

Class::DBI

-

no Moo

-

Perl 5.8

- -
-
-
-

Plugin style

-
-

simple base class

-

-sub handle_mail($self,$incoming_mail) {
- my (@outgoing_messages) = $self->munge_mail($incoming_mail);
- for my $outgoing_message (@outgoing_messages) {
-  $self->send_message($outgoing_message);
- }
- return;
-}
-            
-
-
-

provide all the needed extensions points

-

-sub munge_mail($self,$incoming_mail) {
- return Sietima::Message->new({
-  mail => $incoming_mail,
-  from => $self->return_path,
-  to => $self->subscribers_to_send_to($incoming_mail),
- });
-}
-            
-
-
-

but no more than that

-
-
-

traits / roles

-
    -
  • AvoidDups
  • -
  • Debounce
  • -
  • Headers
  • -
  • ManualSubscription
  • -
  • NoMail
  • -
  • ReplyTo
  • -
  • SubjectTag
  • -
  • SubscriberOnly::Drop
  • -
  • SubscriberOnly::Moderate
  • -
-
-
-

try to avoid cross-trait dependencies

-

«ReplyTo needs WithPostAddress» is fine

-

but «SubscriberOnly::Moderate should be added after Debounce» is not

-

sadly I couldn't avoid it, suggestions welcome

-
-
-
-

Driver

-
-

App::Spec

-
-
-

minimal spec in base class

-

-sub command_line_spec($self) {
- return {
-  name => 'sietima',
-  title => 'a simple mailing list manager',
-  subcommands => {
-   send => {
-    op => 'handle_mail_from_stdin',
-    summary => 'send email from STDIN',
-   },
-  },
- };
-}
-            
-
-
-

enriched by plugins

-

-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",
-  parameters => [ {
-   name => 'mail-id', required => 1,
-   summary => "id of the mail to $cmd",
-   completion => { op => $list_mail_ids },
-  } ],
- ) };
-
- $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'),
- };
-
- return $spec;
-};
-            
-
-
-

-$ 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
-            
-
-
-

-$ sietima-test resume-held <TAB>
-0f0571203ef5ee2f786b7f7f2832093ed4c34fe8
-4d43ee7a2a17457606c07475b14054839fad9b7e
-            
-
-
-
-

Production ready!

-
-

all my lists now run with Sietima

-
-
-

coming soon to a CPAN near you

-
-
-
-

CPAN is awesome

-
-

Email::*, RJBS

-
-
-

Moo, MST + HAARG

-

Type::Tiny, TOBYINK

-
-
-

App::Spec, TINITA

-
-
-

Test2, EXODIST

-
-
-
-

Thank you

-
-
-
- - - - - -- cgit v1.2.3