mojolicious / mojo

:sparkles: Mojolicious - Perl real-time web framework
https://mojolicious.org
Artistic License 2.0
2.66k stars 577 forks source link

Preload controller classes #1607

Closed kraih closed 3 years ago

kraih commented 3 years ago

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.

kraih commented 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.

kraih commented 3 years ago

I had the feature almost implemented before i noticed. 😭 https://github.com/mojolicious/mojo/compare/controller_preloading