X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FEmail%2FTemplate.pm;h=3a9947e51548843f5953125566ef3c5fe1e79ced;hb=5cf821d32d43491b5336d23310e484908f7a3cc4;hp=0e55e538fca971208c41a05e8ce7c45e66e976fe;hpb=cce24d41c4d7191c65818bff8681be8849bace3d;p=catagits%2FCatalyst-View-Email.git diff --git a/lib/Catalyst/View/Email/Template.pm b/lib/Catalyst/View/Email/Template.pm index 0e55e53..3a9947e 100644 --- a/lib/Catalyst/View/Email/Template.pm +++ b/lib/Catalyst/View/Email/Template.pm @@ -3,11 +3,10 @@ package Catalyst::View::Email::Template; use Moose; use Carp; use Scalar::Util qw/ blessed /; - extends 'Catalyst::View::Email'; -our $VERSION = '0.13.01'; - +our $VERSION = '0.26_01'; +$VERSION = eval $VERSION; =head1 NAME Catalyst::View::Email::Template - Send Templated Email from Catalyst @@ -218,10 +217,9 @@ sub generate_part { { content_type => $e_m_attrs->{content_type}, stash_key => $self->stash_key, - %{ $c->stash }, + %{$c->stash}, } ); - if ( ref $output ) { croak $output->can('as_string') ? $output->as_string : $output; } @@ -237,7 +235,7 @@ sub generate_part { 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. +L. =cut @@ -247,7 +245,6 @@ around 'process' => sub { return $self->$orig( $c, @args ) unless $c->stash->{$stash_key}->{template} or $c->stash->{$stash_key}->{templates}; - warn "Stash: " . $stash_key; # in case of the simple api only one my @parts = (); @@ -286,7 +283,7 @@ around 'process' => sub { delete $c->stash->{$stash_key}->{body}; $c->stash->{$stash_key}->{parts} ||= []; push @{ $c->stash->{$stash_key}->{parts} }, @parts; - + return $self->$orig($c); };