NAME

YATT::Lite::MFields -- fields for multiple inheritance.

SYNOPSIS

# Like fields.pm
use YATT::Lite::MFields qw/foo bar baz/;

# Or more descriptive (but these attributes are for documentation only)
use YATT::Lite::MFields
  ([name => is => 'ro', doc => "Name of the user"]
  , [age => is => 'rw', doc => "Age of the user"]
  );

# Or, more procedural way.
use YATT::Lite::MFields sub {
  my ($meta) = @_;
  $meta->has(name => is => 'ro', doc => "Name of the user");
  $meta->has(age => is => 'rw', doc => "Age of the user");
};

DESCRIPTION

This module manipulates caller's %FIELDS hash at compile time so that caller can detect field-name error at compile time. Traditionally this is done by fields module. But it explicitly prohibits multiple inheritance.

Yes, avoiding care-less use of multiple inheritance is important. But if used correctly, multi-inheritance is good tool to make your program being modular.