Open guest20 opened 11 months ago
Oh, I see, when my routes are dispatched their first argument ($c
) is a generic Mojolicious::Controller
and not a MyApp::Controller::WebsiteContent
...
(That also means I can't has
attributes in my controllers)
Ah great! Glad you figured it out! I'm delighted to hear that this plugin still works since it was created 6 years ago, so ~Mojolicious 7.31.
Yeah, disappointing to not be able to has
, isn't it? I sometimes find myself wishing for that even when I'm writing true Mojolicious::Lite apps, in which case I realize what I'm actually wanting is a helper anyway so I shrug it off and write my helper like I should. And, when I really do think it's a has
I should be using, I either create an appropriate class (like MyApp::Model) and/or by that time end up switching to a full app anyway.
Yes, it's a lovely little bit of jank.
First of all, thanks for the free software!
In mounted apps the helpers seem to leak out to the mount-ee app... I expected helpers to be visible from outside a Mojoyst controller too...
It might be good that the helpers don't escape their controller. I ended up just moving the helper(s) out into
sub startup
for the app itself...