From: J. Shirley Date: Tue, 30 Oct 2007 22:49:56 +0000 (+0000) Subject: adding pod X-Git-Tag: v0.14~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11a0bf18e072426543550749db8d152b362b871f;p=catagits%2FCatalyst-View-Email.git adding pod --- diff --git a/lib/Catalyst/View/Email.pm b/lib/Catalyst/View/Email.pm index bb304cf..987186e 100644 --- a/lib/Catalyst/View/Email.pm +++ b/lib/Catalyst/View/Email.pm @@ -173,6 +173,15 @@ sub new { 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 to handle +the actual email delivery. + +=cut + sub process { my ( $self, $c ) = @_; @@ -234,6 +243,15 @@ sub process { } } +=head2 setup_attributes + +Merge attributes with the configured defaults. You can override this method to +return a structure to pass into L which subsequently +passes the return value of this method to Email::MIME->create under the +C key. + +=cut + sub setup_attributes { my ( $self, $c, $attrs ) = @_; @@ -261,6 +279,15 @@ sub setup_attributes { return $e_m_attrs; } +=head2 generate_message($c, $attr) + +Generate a message part, which should be an L 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 ) = @_; diff --git a/lib/Catalyst/View/Email/Template.pm b/lib/Catalyst/View/Email/Template.pm index 242e693..0a5548e 100644 --- a/lib/Catalyst/View/Email/Template.pm +++ b/lib/Catalyst/View/Email/Template.pm @@ -141,6 +141,13 @@ sub _validate_view { 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 @@ sub generate_part { ); } +=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 for processing, which in turn hands off to +L + +=cut + sub process { my ( $self, $c ) = @_;