bumped version, fixed spelling errors
[catagits/Catalyst-View-Email.git] / lib / Catalyst / View / Email / Template.pm
index 72aa085..3c37f9c 100644 (file)
@@ -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';
-
+our $VERSION = '0.25_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,17 +235,16 @@ 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<Catalyst::View::Email> for processing, which in turn hands off to
-L<Email::Send>.
+L<Email::Sender::Simple>.
 
 =cut
 
 around 'process' => sub {
     my ( $orig, $self, $c, @args ) = @_;
     my $stash_key = $self->stash_key;
-    return $self->SUPER::process( $c, @args )
+    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,8 +283,8 @@ around 'process' => sub {
     delete $c->stash->{$stash_key}->{body};
     $c->stash->{$stash_key}->{parts} ||= [];
     push @{ $c->stash->{$stash_key}->{parts} }, @parts;
-
-    return $self->SUPER::process($c);
+    
+    return $self->$orig($c);
 
 };