I am working on a MooX module that needs to add a wrapper around the constructor.
I've tried method modifies or having the import method directly change *{"${target}::new"} with no effect.
*{"${target}::new"}
So how can I do this?
Apparently, around does work:
package MyRole; use Moo::Role around new => sub { ... };
but the role that has the around needs to be consumed after attributes are added, e.g.
package MyClass; use Moo; has attr1 => (... ); with 'MyRole';
Apparently, around does work:
but the role that has the around needs to be consumed after attributes are added, e.g.