Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How does one make a Mojolicious app periodically update the contents of a webpage? Is there more than one way to do it? I'm looking for as smooth a transition as possible, of text or an image (my ultimate goal). Here's an SSCCE:
Thanks for your guidance.#!/usr/bin/perl use strict; use warnings; use Mojolicious::Lite; use Time::HiRes 'time'; get '/' => sub { my $c = shift; my $t = timer(); $c->render(text => $t) }; app->start; sub timer { return time }
Back to
Seekers of Perl Wisdom