Today I migrated one application to Mojolicious 9 🎉
Since I had some errors, I just wanted to share if it could help others to migrate quickly.
It's not a big application (~2000 lines of code) but it has authentication, external calls, DB access and a flat config loaded at startup. It uses some plugins like Authentication, Status, Config and AccessLog.
I like to think it is a small but good coverage of Mojolicious features.
I said I had errors, but actually very few and I will give my solutions right below.
In my case it was a matter of replacing something like:
my $auth = $r->route('/members')->over(authenticated => 1);
per something like:
my $auth = $r->under('/members')->requires(authenticated => 1);
I wonder if code snippets shown on Mojolicious::Plugin::Authentication doc are still valid for Mojolicious 9 (?).
This sub seems to have moved, I fixed by simply adding:
use Mojo::JSON qw(decode_json encode_json);
I like Mojolicious ❤️ and the way it is so actively developed. It's true that there is sometimes some small breakages (I remember in the past a breakage about slurp) but it is always well documented and painless 👍
Long live to Mojolicious!