Thanks Toby! init_arg => undef is a new one on me. Why do you need to declare a default value (or what is the point) when you use that parameter to the attribute?
I quite often use simple subs for constants if only because the syntax to declare them is simpler and shorter. I guess the author of this code (which is used to access the elements of a work queue job) prioritized simpler and shorter syntax at the calling end, preferring $self->job->[INDEX_FOO] to $self->job->[ $self->INDEX_FOO ] ...
I think I like the solution you showed in your other reply. Thanks again!
In reply to Re^3: Exporting constants from a Moo role
by 1nickt
in thread Exporting constants from a Moo role
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |