[siesta-commit] siesta/lib/Siesta/Plugin Subscribe.pm,1.1,1.2

[prev] [thread] [next] [lurker] [Date index for 2002/08/23]

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta/Plugin Subscribe.pm,1.1,1.2
Date: 17:33 on 23 Aug 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin
In directory usw-pr-cvs1:/tmp/cvs-serv20539

Modified Files:
	Subscribe.pm 
Log Message:
update to use the new ->process interface


Index: Subscribe.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Subscribe.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Subscribe.pm	23 Aug 2002 07:28:44 -0000	1.1
+++ Subscribe.pm	23 Aug 2002 16:33:48 -0000	1.2
@@ -9,21 +9,22 @@
 
 sub process {
     my $self = shift;
-    my %args = @_;
-    my $mail = $args{mail};
-    my $list = $args{list};
+    my $mail = shift;
+    my $list = $mail->list;
+
     if ($list->add_member($mail->from)) {
-      $mail->reply("Hi",
-                   "You have been sucessfully subscribed to ",$list->id(),".\n",
-                   "Enjoy,\n",
-                   "- Siesta::Plugin::Subscribe\n");
-    } else {
-      $mail->reply("Hi",
-                   "You could not be subscribed to ",$list->id(),".",
-                   "Maybe you are already subscribed? You might like to contact ",$list->owner(),
-                   " for more assistance.\n",
-                   "Apologies,\n",
-                   "- Siesta::Plugin::Subscribe\n");
+        $mail->reply("Hi",
+                     "You have been sucessfully subscribed to ",$list->id(),".\n",
+                     "Enjoy,\n",
+                     "- Siesta::Plugin::Subscribe\n");
+    }
+    else {
+        $mail->reply("Hi",
+                     "You could not be subscribed to ",$list->id(),".",
+                     "Maybe you are already subscribed? You might like to contact ",$list->owner(),
+                     " for more assistance.\n",
+                     "Apologies,\n",
+                     "- Siesta::Plugin::Subscribe\n");
     }
     return 1;
 }



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52