replace deprecated method in Mojolicious