Replies: 1 comment 1 reply
-
When defining packages in the same file, ordering becomes an issue, since you don't have the ordering provided by a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying learn Mojo::Base and create a simple model class with it starting with a simple test file:
Though when I run it I get the following error:
Line 9 is:
Though if I move the class
MyModel
to a separate file, it works as expected. It also works as expected if I use$obj->attr('name' => ...)
instead of$obj->name(...)
.So I ask, am I doing anything wrong? Or could the function
has()
inMojo::Base
be slightly modified to work on classes defined in the same file?Tested with
Mojolicious 9.22
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions