[dancer-users] Refresh a Route periodically

Mike South msouth at gmail.com
Wed Jul 3 07:28:51 BST 2013


On Tue, Jul 2, 2013 at 4:56 PM, Anand Meher <kvmsanand at gmail.com> wrote:

> 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.
>

I have virtually no experience with Perl on Windows.  So it's probably
safest to ignore me.  But it's possible that the problem is only with the
test module having some kind of problem on Windows--the module you're
trying to install might actually work ok if you skip the tests or force the
install.  (cpanm --help).

mike


> could you please help with a solution for this?
>
> Thank you in advance
>
> Best Regards
> Ajay MK
>
>
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130703/6a4700b5/attachment.htm>


More information about the dancer-users mailing list