Skip to content

mohawk2/moox-stricthas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

MooX::StrictHas - Forbid "has" attributes lazy_build and auto_deref

PROJECT STATUS

OS Build status
Linux Build Status

CPAN version Coverage Status

SYNOPSIS

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
);
has attr2 => (
  is => 'ro',
  does => "Thing", # 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.

  • does

    Unsupported; use isa instead.

  • lazy_build

    Use is => 'lazy' instead.

AUTHOR

Ed J

LICENCE

The same terms as Perl itself.

About

Moo extension to catch Moose features not in Moo

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages