[dancer-users] Refresh a Route periodically
Anand Meher
kvmsanand at gmail.com
Tue Jul 2 22:56:37 BST 2013
Dear Perl Dancer Experts,
I am new to perl dancer. Thank you
for the dancer framework. I could ramp-up quickly w.r.t using dancer
framework to develop simple web-pages.
I am trying to develop a webpage where I would like to have contents of a
webpage refreshed (say after every x seconds).
I briefly went through the mailing lists and other sites and I figured out
that AnyEvent from Twiggy might be one solution to do it.
I wanted to solve the problem by redirecting a route to itself after every
x seconds.
something like :
get '/' => sub {
$w = AnyEvent->timer(after => 1, interval => 15, cb => sub {
# do some database retrievals
redirect "/";
});
template 'index';
};
Could you please suggest if this will work , or if there is any other
better and easier way to do it.
Also : When I try installing Twiggy by using cpanm Twiggy, the
installation gets stuck at the point "Building and testing
Test-SharedFork-0.21 ...". I am using a windows 64 bit machine with
strawberry perl, with version - 5.10.1.
could you please help with a solution for this?
Thank you in advance
Best Regards
Ajay MK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130702/4124436a/attachment.htm>
More information about the dancer-users
mailing list