Let's assume that the way Moose::Meta::Attribute::Native does it is the best possible way (given that it's part of Moose core now). Then the best possible way is, rather than including a BUILD method, use:
after 'install_accessors' => sub { my $self = shift; # ... };
In reply to Re: Moose: Adding methods to a class via attribute traits
by tobyink
in thread Moose: Adding methods to a class via attribute traits
by Nasrudin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |