MooX::StrictHas - Forbid "has" attributes lazy_build and auto_deref
package MyMod; use Moo; use MooX::StrictHas; has attr => ( is => 'ro', auto_deref => 1, # blows up, not implemented in Moo ); has attr2 => ( is => 'ro', lazy_build => 1, # blows up, not implemented in Moo );
This is a Moo extension, intended to aid those porting modules from Moose to Moo. It forbids two attributes for "has" in Moo, which Moo does not implement, but silently accepts:
This is not considered best practice - just dereference in your using code.
Use is => 'lazy' instead.
is => 'lazy'
Ed J
The same terms as Perl itself.
To install MooX::StrictHas, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooX::StrictHas
CPAN shell
perl -MCPAN -e shell install MooX::StrictHas
For more information on module installation, please visit the detailed CPAN module installation guide.