rev 1410 - in trunk/siesta: lib/Siesta t

[prev] [thread] [next] [lurker] [Date index for 2003/09/16]

From: richardc
Subject: rev 1410 - in trunk/siesta: lib/Siesta t
Date: 13:35 on 16 Sep 2003
Author: richardc
Date: 2003-09-16 13:35:34 +0100 (Tue, 16 Sep 2003)
New Revision: 1410

Modified:
   trunk/siesta/lib/Siesta/Message.pm
   trunk/siesta/t/09defer.t
Log:
start to deprecate Message->resume

Modified: trunk/siesta/lib/Siesta/Message.pm
===================================================================
--- trunk/siesta/lib/Siesta/Message.pm	2003-09-15 19:18:26 UTC (rev 1409)
+++ trunk/siesta/lib/Siesta/Message.pm	2003-09-16 12:35:34 UTC (rev 1410)
@@ -3,7 +3,7 @@
 use Siesta;
 use Siesta::Deferred;
 use Mail::Address;
-use Carp qw( croak );
+use Carp qw( carp croak );
 use Storable qw(dclone);
 use base qw( Email::Simple Class::Accessor::Fast );
 __PACKAGE__->mk_accessors(qw( plugins ));
@@ -133,6 +133,7 @@
     my $self = shift;
     my $id   = shift;
 
+    carp "Siesta::Message->resume is deprected, use resume on a Siesta::Deferred object instead";
     my $deferred = Siesta::Deferred->retrieve( $id );
     $deferred->resume;
 }

Modified: trunk/siesta/t/09defer.t
===================================================================
--- trunk/siesta/t/09defer.t	2003-09-15 19:18:26 UTC (rev 1409)
+++ trunk/siesta/t/09defer.t	2003-09-16 12:35:34 UTC (rev 1410)
@@ -80,7 +80,7 @@
 @deferred = Siesta::Deferred->retrieve_all;
 is( scalar @deferred, 1, "we have 1 deferred message" );
 
-Siesta::Message->resume( $handle->id );
+$handle->resume;
 
 @deferred = Siesta::Deferred->retrieve_all;
 is( scalar @deferred, 0, "not deferred now" );
@@ -89,7 +89,7 @@
     "resumed message ran the right stages" );
 
 # check cascading delete on $user
-$message->defer(who => $user, why => 'test');
+$handle = $message->defer(who => $user, why => 'test');
 ok( $handle, "froze something with somewhere to go" );
 
 @deferred = Siesta::Deferred->retrieve_all;

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