[prev] [thread] [next] [lurker] [Date index for 2002/08/23]
Update of /cvsroot/siesta/siesta/lib In directory usw-pr-cvs1:/tmp/cvs-serv13486/lib Modified Files: Siesta.pm Log Message: select a pipeline Index: Siesta.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Siesta.pm 23 Aug 2002 14:26:34 -0000 1.10 +++ Siesta.pm 23 Aug 2002 17:57:10 -0000 1.11 @@ -14,10 +14,18 @@ sub process { my %args = @_; + my $action = $args{action} || 'post'; my $mail = Siesta::Message->new( $args{mail} ); my $list = $mail->list( Siesta::List->new( $args{list} ) ) or die "couldn't load list '$args{list}'"; - for my $class (map { "Siesta::Plugin::$_" } $list->plugins) { + + my @plugins; # plugins to run + if ($action eq 'post') { @plugins = $list->plugins } + elsif ($action eq 'sub') { @plugins = qw( Subscribe ) } + elsif ($action eq 'unsub') { @plugins = qw( UnSubscribe ) } + else { @plugins = qw( Domo ) }; + + for my $class (map { "Siesta::Plugin::$_" } @plugins ) { print "$class\n" if debug; eval "require $class"; die $@ if $@;
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52