[Catalyst] Catalyst::Plugin::RunAfterRequest and Catalyst::View::Email?

Chakkit Ngamsom chakkit at ibiz.co.th
Wed Mar 2 20:12:56 GMT 2011

Hi All,


My plan is to use Catalyst::Plugin::RunAfterRequest for sending email via
Catalyst::View::Email as the background.

Due to sometimes mail server got lag and the page waiting for it or sending
a notification after slow processes have been completed e.g. import/export.


I'm not sure it's a bug or the limitation of the plugin.

I setup the code something like this:



  sub {

    $c->stash->{email} = {

      from => $from,

      to => $to,

      body => $body,

      header => [

        Subject => 'some localized subject',



    $c->forward( $c->view('Email') );




After running it, it showed an error like this:
[error] Caught exception in engine "Modification of non-creatable array
value attempted, subscript -1 at
C:/strawberry/perl/site/lib/Catalyst/Dispatcher.pm line 278."


As a trial, the error caused from this line: $c->forward( $c->view('Email')

Finally, I noticed it worked well with other forwarding except view.


Please kindly let me know how to fix this issue or another solution that
matches to the requirements.


Thanks in advance,



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110303/a7413b3f/attachment.htm

More information about the Catalyst mailing list