[siesta-commit] siesta/lib/Siesta Message.pm,1.18,1.19

[prev] [thread] [next] [lurker] [Date index for 2002/09/14]

From: muttley
Subject: [siesta-commit] siesta/lib/Siesta Message.pm,1.18,1.19
Date: 10:19 on 14 Sep 2002
Update of /cvsroot/siesta/siesta/lib/Siesta
In directory usw-pr-cvs1:/tmp/cvs-serv13193/lib/Siesta

Modified Files:
	Message.pm 
Log Message:
Fix b0rkenness caused by drunken commit.


Index: Message.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Message.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Message.pm	14 Sep 2002 08:00:08 -0000	1.18
+++ Message.pm	14 Sep 2002 09:19:57 -0000	1.19
@@ -1,6 +1,7 @@
 package Siesta::Message;
 use strict;
 
+use Siesta;
 use Email::Valid;
 use Mail::Internet;
 use base 'Mail::Internet';
@@ -10,17 +11,17 @@
 use Class::MethodMaker get_set => [qw( list user )];
 
 sub to {
-   my $self = shift;
-   if (@_) {
-       $self->head->replace('To', shift);
-   }
-   Email::Valid->address($self->head->get('To') );
+    my $self = shift;
+    if (@_) {
+        $self->head->replace( 'To', shift );
+    }
+    Email::Valid->address( $self->head->get('To') );
 }
 
 sub from {
     my $self = shift;
     if (@_) {
-        $self->head->replace('From', shift);
+        $self->head->replace( 'From', shift );
     }
     Email::Valid->address( $self->head->get('From') );
 }
@@ -37,14 +38,11 @@
     my $self = shift;
     my %args = @_;
 
-    if (defined $args{'body'}) {
+    if ( defined $args{'body'} ) {
         my @body = split /\n/, $args{'body'};
         $self->body(@body);
     }
 
-    my $to   = $args{'to'}   || $self->from();
-    my $from = $args{'from'} || $self->to();
-
     $self->to($to);
     $self->from($from);
 
@@ -53,15 +51,15 @@
 
 sub send {
     my $self = shift;
-    return Siesta->sender->process($self, @_);
+    return Siesta->sender->process( $self, @_ );
 }
 
 sub bounce {
     my $self = shift;
     my %args = @_;
 
-    my $to   = $args{'from'} || $self->from();
-    $self->send(to => $to);
+    my $to = $args{'from'} || $self->from();
+    $self->send( to => $to );
 }
 
 1;



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