Sunday, 25 August 2013

Changing modules without restarting Morbo (Mojolicious)

Changing modules without restarting Morbo (Mojolicious)

I have got a Mojolicious::Lite app:
use Mojolicious::Lite;
use User;
get '/' => sub {
my $self = shift;
$self->render('index');
};
get '/login' => sub {
my $self = shift;
$self->redirect_to(User::getLoginLink);
};
I use Morbo in development. I don't need to restart Morbo if I change code
in this 2 subs, but User::getLoginLink will be updated only with morbo's
restart. Is it possible to make morbo watch for changes in modules? (for
example, 'User' module)

No comments:

Post a Comment