NAME
MooX::StrictHas - Allow Moo attributes to get their values from %ENV
SYNOPSIS
package MyMod;
use Moo;
use MooX::StrictHas;
# look for $ENV{attr_val} and $ENV{ATTR_VAL}
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
);
DESCRIPTION
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:
- auto_deref
-
This is not considered best practice - just dereference in your using code.
- lazy_build
-
Use
is =
'lazy'> instead.
AUTHOR
Ed J
LICENCE
The same terms as Perl itself.