[Catalyst] Moving data with form actions

David Narayan david.narayan at gmail.com
Fri Oct 21 18:40:41 CEST 2005


On 10/21/05, Andy Grundman <andy at hybridized.org> wrote:
> 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};

That is exactly what I was looking for - thanks!

-David



More information about the Catalyst mailing list