Adapted for Mojolicious 4.0

Adapted for Mojolicious 4.0