[Catalyst] Moving data with form actions

Andy Grundman andy at hybridized.org
Fri Oct 21 17:26:39 CEST 2005


David Narayan wrote:
> I am unsure of how to get the requisite data to the mail step. Ideally
> I would like to use SubRequest to render a template for the email and
> simply give that to the mail action. However, I'm unsure of how to get
> the rendered template from preview() to mail(). My initial thought was
> to use a hidden form variable but that seems messy given the size of
> the text.

One option is saving the text in a session variable.

use Catalyst qw/ Session::FastMmap /;

# step 3

$c->session->{email_text} = $text;

# later...step 4

my $text = delete $c->session->{email_text};

-Andy



More information about the Catalyst mailing list