Closed kraih closed 3 years ago
It appears we screwed up and this is not actually possible. Because the app class also happens to be a controller namespace by default. That means we don't have clear boundaries defining what modules contain controllers, and would have to preload absolutely everything.
I had the feature almost implemented before i noticed. 😠https://github.com/mojolicious/mojo/compare/controller_preloading
For efficiency and to make it easier to detect syntax errors it would make sense for the router to preload as many controler classes as possible from the known namespaces during startup.