[Jifty-commit] r699 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Mar 17 16:34:27 EST 2006
Author: alexmv
Date: Fri Mar 17 16:34:27 2006
New Revision: 699
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Notification.pm
jifty/trunk/lib/Jifty/Request.pm
Log:
r8614 at zoq-fot-pik: chmrr | 2006-03-17 16:34:19 -0500
* Doc fixes from Bart Bunting <bart at bunting.net.au>
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Fri Mar 17 16:34:27 2006
@@ -11,11 +11,6 @@
=head1 SYNOPSIS
-In your F<autohandler>, put these two lines first:
-
- require MyApp::Dispatcher;
- MyApp::Dispatcher->handle_request;
-
In B<MyApp::Dispatcher>:
package MyApp::Dispatcher;
Modified: jifty/trunk/lib/Jifty/Notification.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Notification.pm (original)
+++ jifty/trunk/lib/Jifty/Notification.pm Fri Mar 17 16:34:27 2006
@@ -8,7 +8,8 @@
use Email::Simple ();
use Email::Simple::Creator ();
-__PACKAGE__->mk_accessors(qw/body preface footer subject from _recipients/);
+__PACKAGE__->mk_accessors(qw/body preface footer subject from _recipients _to_list to/);
+
=head1 USAGE
@@ -124,8 +125,6 @@
=cut
-__PACKAGE__->mk_accessors(qw/body preface footer subject from _recipients _to_list to/);
-
sub recipients {
my $self = shift;
$self->_recipients([@_]) if @_;
@@ -133,14 +132,31 @@
}
+=head2 email_from OBJECT
+
+Returns the email address from the given object. This defaults to
+calling an 'email' method on the object. This method will be called
+by L</send> to get email addresses (for L</to>) out of the list of
+L</recipients>.
+=cut
+
+sub email_from {
+ my $self = shift;
+ my ($obj) = @_;
+ if ($obj->can('email')) {
+ return $obj->email;
+ } else {
+ die "No 'email' method on ".ref($obj) . "; override 'email_from'";
+ }
+}
-=head2 to_list USER, USER, USER
+=head2 to_list [OBJECT, OBJECT...]
-Gets or sets the list of L<BTDT::Model::User>s that the message will
-be sent to. Each user is sent a separate copy of the email. If
-passed no parameters, returns the users that have been set. This also
-suppresses duplicates to users.
+Gets or sets the list of objects that the message will be sent to.
+Each one is sent a separate copy of the email. If passed no
+parameters, returns the objects that have been set. This also
+suppresses duplicates.
=cut
Modified: jifty/trunk/lib/Jifty/Request.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Request.pm (original)
+++ jifty/trunk/lib/Jifty/Request.pm Fri Mar 17 16:34:27 2006
@@ -662,7 +662,7 @@
=head2 do_mapping PARAMHASH
Takes two possible arguments, C<request> and C<response>; they default
-to the current L<Jifty::Request> and the current L<Jufty::Response>.
+to the current L<Jifty::Request> and the current L<Jifty::Response>.
Calls L<Jifty::Request::Mapper/map> on every argument of this request,
pulling arguments and results from the given C<request> and C<response>.
@@ -840,11 +840,11 @@
active, while all other actions are marked inactive. In the absence
of C<J:ACTIONS>, all actions are active.
-=head1 YAML POST Request Protocool
+=head1 YAML POST Request Protocol
To be spec'd later
-=head1 JSON POST Request Protocool
+=head1 JSON POST Request Protocol
To be spec'd later
More information about the Jifty-commit
mailing list