[Catalyst-commits] r7081 - in
Catalyst-View-Email/0.10/lib/Catalyst/View: . Email
jshirley at dev.catalyst.perl.org
jshirley at dev.catalyst.perl.org
Tue Oct 30 22:49:56 GMT 2007
Author: jshirley
Date: 2007-10-30 22:49:56 +0000 (Tue, 30 Oct 2007)
New Revision: 7081
Modified:
Catalyst-View-Email/0.10/lib/Catalyst/View/Email.pm
Catalyst-View-Email/0.10/lib/Catalyst/View/Email/Template.pm
Log:
adding pod
Modified: Catalyst-View-Email/0.10/lib/Catalyst/View/Email/Template.pm
===================================================================
--- Catalyst-View-Email/0.10/lib/Catalyst/View/Email/Template.pm 2007-10-30 18:05:07 UTC (rev 7080)
+++ Catalyst-View-Email/0.10/lib/Catalyst/View/Email/Template.pm 2007-10-30 22:49:56 UTC (rev 7081)
@@ -141,6 +141,13 @@
unless ($view->can('render'));
}
+=head2 generate_part
+
+Generate a MIME part to include in the email. Since the email is template based
+every template piece is a separate part that is included in the email.
+
+=cut
+
sub generate_part {
my ($self, $c, $attrs) = @_;
@@ -192,6 +199,15 @@
);
}
+=head2 process
+
+The process method is called when the view is dispatched to. This creates the
+multipart message and then sends the message contents off to
+L<Catalyst::View::Email> for processing, which in turn hands off to
+L<Email::Send>
+
+=cut
+
sub process {
my ( $self, $c ) = @_;
Modified: Catalyst-View-Email/0.10/lib/Catalyst/View/Email.pm
===================================================================
--- Catalyst-View-Email/0.10/lib/Catalyst/View/Email.pm 2007-10-30 18:05:07 UTC (rev 7080)
+++ Catalyst-View-Email/0.10/lib/Catalyst/View/Email.pm 2007-10-30 22:49:56 UTC (rev 7081)
@@ -173,6 +173,15 @@
return $self;
}
+=head2 process
+
+The process method does the actual processing when the view is dispatched to.
+
+This method sets up the email parts and hands off to L<Email::Send> to handle
+the actual email delivery.
+
+=cut
+
sub process {
my ( $self, $c ) = @_;
@@ -234,6 +243,15 @@
}
}
+=head2 setup_attributes
+
+Merge attributes with the configured defaults. You can override this method to
+return a structure to pass into L<generate_message> which subsequently
+passes the return value of this method to Email::MIME->create under the
+C<attributes> key.
+
+=cut
+
sub setup_attributes {
my ( $self, $c, $attrs ) = @_;
@@ -261,6 +279,15 @@
return $e_m_attrs;
}
+=head2 generate_message($c, $attr)
+
+Generate a message part, which should be an L<Email::MIME> object and return it.
+
+Takes the attributes, merges with the defaults as necessary and returns a
+message object.
+
+=cut
+
sub generate_message {
my ( $self, $c, $attr ) = @_;
More information about the Catalyst-commits
mailing list