Moving Perl Mojolicious routes to their own module

Mark Gardner
3 min readJun 8, 2021

A mentee asked me over the week­end if there was a way with­in a Mojo­li­cious web appli­ca­tion to store the routes sep­a­rate­ly from the main appli­ca­tion class. Here’s one way. These instruc­tions assume you’re using Perl 5.34 and Mojo­li­cious 9.19 (the lat­est as of this writ­ing) via the ter­mi­nal com­mand line on a Lin­ux, Unix, or macOS sys­tem; make the appro­pri­ate changes if this…

--

--