Hi again,
Does anybody know if and how it is possible
to render a template for the user and
then forward to a new route,
Something like
get '/routeA/:*?' => sub {
my $id = params->{'id'};
my $blub = params->{'blub'};
delayed {
my $tt = Template->new(
{INCLUDE_PATH => "$path",
WRAPPER => 'layout.tt',
RELATIVE => 1,
}) || die "Template error: $Template::ERROR\n";
$tt->process('view.tt', {
'id' => $id,
'bla' => $blub
};
flush;
content $tt;
done;
};
forward '/routeB/',{
'id' => $id,
'bla' => $blub
};
};
get '/routeB/:*?' => sub {
my $id = params->{'id'};
my $blub = params->{'bla'};
# Do something from here on
};
That would solve the async response troubles for me I guess.
@John, I'd rather try to do as much as possible without having to
handle JSON additionally,
if async streaming is possible the way I like to use it, I will
have no other choice anyway I guess.
--joerg
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
--
John J. McDermott, CPLP
Learning and Performance Consultant
jjm at jkintl.com 575/737-8556
Check out my
security blog posts
Add an A for the Arts To STEM and get STEAM and a strong engine to
move forward.